@@ -815,367 +815,4 @@ for (f, elty) in ((:dtgevc_, :Float64), (:stgevc_, :Float32))
815
815
end
816
816
end
817
817
818
-
819
- # Rectangular full packed format
820
-
821
- # # Symmetric rank-k operation for matrix in RFP format.
822
- for (f, elty, relty) in (
823
- (:dsfrk_ , :Float64 , :Float64 ),
824
- (:ssfrk_ , :Float32 , :Float32 ),
825
- (:zhfrk_ , :ComplexF64 , :Float64 ),
826
- (:chfrk_ , :ComplexF32 , :Float32 ),
827
- )
828
-
829
- @eval begin
830
- function sfrk! (
831
- transr:: Char ,
832
- uplo:: Char ,
833
- trans:: Char ,
834
- alpha:: Real ,
835
- A:: StridedMatrix{$elty} ,
836
- beta:: Real ,
837
- C:: StridedVector{$elty} ,
838
- )
839
- chkuplo (uplo)
840
- chkstride1 (A)
841
- if trans in (' N' , ' n' )
842
- n, k = size (A)
843
- elseif trans in (' T' , ' t' , ' C' , ' c' )
844
- k, n = size (A)
845
- end
846
- lda = max (1 , stride (A, 2 ))
847
-
848
- ccall (
849
- (@blasfunc ($ f), liblapack_name),
850
- Cvoid,
851
- (
852
- Ref{UInt8},
853
- Ref{UInt8},
854
- Ref{UInt8},
855
- Ref{BlasInt},
856
- Ref{BlasInt},
857
- Ref{$ relty},
858
- Ptr{$ elty},
859
- Ref{BlasInt},
860
- Ref{$ relty},
861
- Ptr{$ elty},
862
- ),
863
- transr,
864
- uplo,
865
- trans,
866
- n,
867
- k,
868
- alpha,
869
- A,
870
- lda,
871
- beta,
872
- C,
873
- )
874
- C
875
- end
876
- end
877
- end
878
-
879
- # Cholesky factorization of a real symmetric positive definite matrix A
880
- for (f, elty) in (
881
- (:dpftrf_ , :Float64 ),
882
- (:spftrf_ , :Float32 ),
883
- (:zpftrf_ , :ComplexF64 ),
884
- (:cpftrf_ , :ComplexF32 ),
885
- )
886
-
887
- @eval begin
888
- function pftrf! (transr:: Char , uplo:: Char , A:: StridedVector{$elty} )
889
- chkuplo (uplo)
890
- n = round (Int, div (sqrt (8 length (A)), 2 ))
891
- info = Vector {BlasInt} (undef, 1 )
892
-
893
- ccall (
894
- (@blasfunc ($ f), liblapack_name),
895
- Cvoid,
896
- (Ref{UInt8}, Ref{UInt8}, Ref{BlasInt}, Ptr{$ elty}, Ptr{BlasInt}),
897
- transr,
898
- uplo,
899
- n,
900
- A,
901
- info,
902
- )
903
- A
904
- end
905
- end
906
- end
907
-
908
- # Computes the inverse of a (real) symmetric positive definite matrix A using the Cholesky factorization
909
- for (f, elty) in (
910
- (:dpftri_ , :Float64 ),
911
- (:spftri_ , :Float32 ),
912
- (:zpftri_ , :ComplexF64 ),
913
- (:cpftri_ , :ComplexF32 ),
914
- )
915
-
916
- @eval begin
917
- function pftri! (transr:: Char , uplo:: Char , A:: StridedVector{$elty} )
918
- chkuplo (uplo)
919
- n = round (Int, div (sqrt (8 length (A)), 2 ))
920
- info = Vector {BlasInt} (undef, 1 )
921
-
922
- ccall (
923
- (@blasfunc ($ f), liblapack_name),
924
- Cvoid,
925
- (Ref{UInt8}, Ref{UInt8}, Ref{BlasInt}, Ptr{$ elty}, Ptr{BlasInt}),
926
- transr,
927
- uplo,
928
- n,
929
- A,
930
- info,
931
- )
932
-
933
- A
934
- end
935
- end
936
- end
937
-
938
- # DPFTRS solves a system of linear equations A*X = B with a symmetric positive definite matrix A using the Cholesky factorization
939
- for (f, elty) in (
940
- (:dpftrs_ , :Float64 ),
941
- (:spftrs_ , :Float32 ),
942
- (:zpftrs_ , :ComplexF64 ),
943
- (:cpftrs_ , :ComplexF32 ),
944
- )
945
-
946
- @eval begin
947
- function pftrs! (
948
- transr:: Char ,
949
- uplo:: Char ,
950
- A:: StridedVector{$elty} ,
951
- B:: StridedVecOrMat{$elty} ,
952
- )
953
- chkuplo (uplo)
954
- chkstride1 (B)
955
- n = round (Int, div (sqrt (8 length (A)), 2 ))
956
- if n != size (B, 1 )
957
- throw (DimensionMismatch (" B has first dimension $(size (B,1 )) but needs $n " ))
958
- end
959
- nhrs = size (B, 2 )
960
- ldb = max (1 , stride (B, 2 ))
961
- info = Vector {BlasInt} (undef, 1 )
962
-
963
- ccall (
964
- (@blasfunc ($ f), liblapack_name),
965
- Cvoid,
966
- (
967
- Ref{UInt8},
968
- Ref{UInt8},
969
- Ref{BlasInt},
970
- Ref{BlasInt},
971
- Ptr{$ elty},
972
- Ptr{$ elty},
973
- Ref{BlasInt},
974
- Ptr{BlasInt},
975
- ),
976
- transr,
977
- uplo,
978
- n,
979
- nhrs,
980
- A,
981
- B,
982
- ldb,
983
- info,
984
- )
985
-
986
- B
987
- end
988
- end
989
- end
990
-
991
- # Solves a matrix equation (one operand is a triangular matrix in RFP format)
992
- for (f, elty) in (
993
- (:dtfsm_ , :Float64 ),
994
- (:stfsm_ , :Float32 ),
995
- (:ztfsm_ , :ComplexF64 ),
996
- (:ctfsm_ , :ComplexF32 ),
997
- )
998
-
999
- @eval begin
1000
- function tfsm! (
1001
- transr:: Char ,
1002
- side:: Char ,
1003
- uplo:: Char ,
1004
- trans:: Char ,
1005
- diag:: Char ,
1006
- alpha:: $elty ,
1007
- A:: StridedVector{$elty} ,
1008
- B:: StridedVecOrMat{$elty} ,
1009
- )
1010
- chkuplo (uplo)
1011
- chkside (side)
1012
- chkdiag (diag)
1013
- chkstride1 (B)
1014
- m, n = size (B, 1 ), size (B, 2 )
1015
- if round (Int, div (sqrt (8 length (A)), 2 )) != m
1016
- throw (
1017
- DimensionMismatch (
1018
- " First dimension of B must equal $(round (Int, div (sqrt (8 length (A)), 2 ))) , got $m " ,
1019
- ),
1020
- )
1021
- end
1022
- ldb = max (1 , stride (B, 2 ))
1023
-
1024
- ccall (
1025
- (@blasfunc ($ f), liblapack_name),
1026
- Cvoid,
1027
- (
1028
- Ref{UInt8},
1029
- Ref{UInt8},
1030
- Ref{UInt8},
1031
- Ref{UInt8},
1032
- Ref{UInt8},
1033
- Ref{BlasInt},
1034
- Ref{BlasInt},
1035
- Ref{$ elty},
1036
- Ptr{$ elty},
1037
- Ptr{$ elty},
1038
- Ref{BlasInt},
1039
- ),
1040
- transr,
1041
- side,
1042
- uplo,
1043
- trans,
1044
- diag,
1045
- m,
1046
- n,
1047
- alpha,
1048
- A,
1049
- B,
1050
- ldb,
1051
- )
1052
-
1053
- return B
1054
- end
1055
- end
1056
- end
1057
-
1058
- # Computes the inverse of a triangular matrix A stored in RFP format.
1059
- for (f, elty) in (
1060
- (:dtftri_ , :Float64 ),
1061
- (:stftri_ , :Float32 ),
1062
- (:ztftri_ , :ComplexF64 ),
1063
- (:ctftri_ , :ComplexF32 ),
1064
- )
1065
-
1066
- @eval begin
1067
- function tftri! (transr:: Char , uplo:: Char , diag:: Char , A:: StridedVector{$elty} )
1068
- chkuplo (uplo)
1069
- chkdiag (diag)
1070
- n = round (Int, div (sqrt (8 length (A)), 2 ))
1071
- info = Vector {BlasInt} (undef, 1 )
1072
-
1073
- ccall (
1074
- (@blasfunc ($ f), liblapack_name),
1075
- Cvoid,
1076
- (
1077
- Ref{UInt8},
1078
- Ref{UInt8},
1079
- Ref{UInt8},
1080
- Ref{BlasInt},
1081
- Ptr{$ elty},
1082
- Ptr{BlasInt},
1083
- ),
1084
- transr,
1085
- uplo,
1086
- diag,
1087
- n,
1088
- A,
1089
- info,
1090
- )
1091
-
1092
- A
1093
- end
1094
- end
1095
- end
1096
-
1097
- # Copies a triangular matrix from the rectangular full packed format (TF) to the standard full format (TR)
1098
- for (f, elty) in (
1099
- (:dtfttr_ , :Float64 ),
1100
- (:stfttr_ , :Float32 ),
1101
- (:ztfttr_ , :ComplexF64 ),
1102
- (:ctfttr_ , :ComplexF32 ),
1103
- )
1104
-
1105
- @eval begin
1106
- function tfttr! (transr:: Char , uplo:: Char , Arf:: StridedVector{$elty} )
1107
- chkuplo (uplo)
1108
- n = round (Int, div (sqrt (8 length (Arf)), 2 ))
1109
- info = Vector {BlasInt} (undef, 1 )
1110
- A = similar (Arf, $ elty, n, n)
1111
-
1112
- ccall (
1113
- (@blasfunc ($ f), liblapack_name),
1114
- Cvoid,
1115
- (
1116
- Ref{UInt8},
1117
- Ref{UInt8},
1118
- Ref{BlasInt},
1119
- Ptr{$ elty},
1120
- Ptr{$ elty},
1121
- Ref{BlasInt},
1122
- Ptr{BlasInt},
1123
- ),
1124
- transr,
1125
- uplo,
1126
- n,
1127
- Arf,
1128
- A,
1129
- n,
1130
- info,
1131
- )
1132
-
1133
- A
1134
- end
1135
- end
1136
- end
1137
-
1138
- # Copies a triangular matrix from the standard full format (TR) to the rectangular full packed format (TF).
1139
- for (f, elty) in (
1140
- (:dtrttf_ , :Float64 ),
1141
- (:strttf_ , :Float32 ),
1142
- (:ztrttf_ , :ComplexF64 ),
1143
- (:ctrttf_ , :ComplexF32 ),
1144
- )
1145
-
1146
- @eval begin
1147
- function trttf! (transr:: Char , uplo:: Char , A:: StridedMatrix{$elty} )
1148
- chkuplo (uplo)
1149
- chkstride1 (A)
1150
- n = size (A, 1 )
1151
- lda = max (1 , stride (A, 2 ))
1152
- info = Vector {BlasInt} (undef, 1 )
1153
- Arf = similar (A, $ elty, div (n * (n + 1 ), 2 ))
1154
-
1155
- ccall (
1156
- (@blasfunc ($ f), liblapack_name),
1157
- Cvoid,
1158
- (
1159
- Ref{UInt8},
1160
- Ref{UInt8},
1161
- Ref{BlasInt},
1162
- Ptr{$ elty},
1163
- Ref{BlasInt},
1164
- Ptr{$ elty},
1165
- Ptr{BlasInt},
1166
- ),
1167
- transr,
1168
- uplo,
1169
- n,
1170
- A,
1171
- lda,
1172
- Arf,
1173
- info,
1174
- )
1175
-
1176
- Arf
1177
- end
1178
- end
1179
- end
1180
-
1181
818
end
0 commit comments