@@ -100,15 +100,31 @@ function LinearSolve.init_cacheval(
100
100
Pl, Pr,
101
101
maxiters:: Int , abstol, reltol,
102
102
verbose:: Bool , assumptions:: OperatorAssumptions ) where {T<: BLASELTYPES }
103
- SparseArrays. UMFPACK. UmfpackLU (SparseMatrixCSC {T, Int64} (zero (Int64), zero (Int64), [Int64 (1 )], Int64[], T[]))
103
+ if is_cusparse (A)
104
+ ArrayInterface. lu_instance (A)
105
+ else
106
+ SparseArrays. UMFPACK. UmfpackLU (SparseMatrixCSC {T, Int64} (zero (Int64), zero (Int64), [Int64 (1 )], Int64[], T[]))
107
+ end
104
108
end
105
109
106
110
function LinearSolve. init_cacheval (
107
111
alg:: LUFactorization , A:: AbstractSparseArray{T, Int32} , b, u,
108
112
Pl, Pr,
109
113
maxiters:: Int , abstol, reltol,
110
114
verbose:: Bool , assumptions:: OperatorAssumptions ) where {T<: BLASELTYPES }
111
- SparseArrays. UMFPACK. UmfpackLU (SparseMatrixCSC {T, Int32} (zero (Int32), zero (Int32), [Int32 (1 )], Int32[], T[]))
115
+ if LinearSolve. is_cusparse (A)
116
+ ArrayInterface. lu_instance (A)
117
+ else
118
+ SparseArrays. UMFPACK. UmfpackLU (SparseMatrixCSC {T, Int32} (zero (Int32), zero (Int32), [Int32 (1 )], Int32[], T[]))
119
+ end
120
+ end
121
+
122
+ function LinearSolve. init_cacheval (
123
+ alg:: LUFactorization , A:: LinearSolve.GPUArraysCore.AnyGPUArray , b, u,
124
+ Pl, Pr,
125
+ maxiters:: Int , abstol, reltol,
126
+ verbose:: Bool , assumptions:: OperatorAssumptions )
127
+ ArrayInterface. lu_instance (A)
112
128
end
113
129
114
130
function LinearSolve. init_cacheval (
@@ -120,6 +136,14 @@ function LinearSolve.init_cacheval(
120
136
PREALLOCATED_UMFPACK
121
137
end
122
138
139
+ function LinearSolve. init_cacheval (
140
+ alg:: UMFPACKFactorization , A:: LinearSolve.GPUArraysCore.AnyGPUArray , b, u,
141
+ Pl, Pr,
142
+ maxiters:: Int , abstol, reltol,
143
+ verbose:: Bool , assumptions:: OperatorAssumptions )
144
+ nothing
145
+ end
146
+
123
147
function LinearSolve. init_cacheval (
124
148
alg:: UMFPACKFactorization , A:: AbstractSparseArray{T, Int64} , b, u,
125
149
Pl, Pr,
@@ -191,6 +215,14 @@ function LinearSolve.init_cacheval(
191
215
PREALLOCATED_KLU
192
216
end
193
217
218
+ function LinearSolve. init_cacheval (
219
+ alg:: KLUFactorization , A:: LinearSolve.GPUArraysCore.AnyGPUArray , b, u,
220
+ Pl, Pr,
221
+ maxiters:: Int , abstol, reltol,
222
+ verbose:: Bool , assumptions:: OperatorAssumptions )
223
+ nothing
224
+ end
225
+
194
226
function LinearSolve. init_cacheval (
195
227
alg:: KLUFactorization , A:: AbstractSparseArray{Float64, Int32} , b, u, Pl, Pr,
196
228
maxiters:: Int , abstol,
0 commit comments