@@ -3,6 +3,7 @@ module LinearSolveSparseArraysExt
3
3
using LinearSolve, LinearAlgebra
4
4
using SparseArrays
5
5
using SparseArrays: AbstractSparseMatrixCSC, nonzeros, rowvals, getcolptr
6
+ using LinearSolve: BLASELTYPES
6
7
7
8
# Can't `using KLU` because cannot have a dependency in there without
8
9
# requiring the user does `using KLU`
@@ -39,7 +40,7 @@ function LinearSolve.handle_sparsematrixcsc_lu(A::AbstractSparseMatrixCSC)
39
40
end
40
41
41
42
function LinearSolve. defaultalg (
42
- A:: Symmetric{<:Number , <:SparseMatrixCSC} , b, :: OperatorAssumptions{Bool} )
43
+ A:: Symmetric{<:BLASELTYPES , <:SparseMatrixCSC} , b, :: OperatorAssumptions{Bool} )
43
44
LinearSolve. DefaultLinearSolver (LinearSolve. DefaultAlgorithmChoice. CHOLMODFactorization)
44
45
end
45
46
@@ -78,7 +79,7 @@ function LinearSolve.init_cacheval(
78
79
end
79
80
80
81
function LinearSolve. init_cacheval (
81
- alg:: UMFPACKFactorization , A:: AbstractSparseArray , b, u, Pl, Pr,
82
+ alg:: UMFPACKFactorization , A:: AbstractSparseArray{Float64} , b, u, Pl, Pr,
82
83
maxiters:: Int , abstol,
83
84
reltol,
84
85
verbose:: Bool , assumptions:: OperatorAssumptions )
@@ -136,7 +137,7 @@ function LinearSolve.init_cacheval(
136
137
end
137
138
138
139
function LinearSolve. init_cacheval (
139
- alg:: KLUFactorization , A:: AbstractSparseArray , b, u, Pl, Pr,
140
+ alg:: KLUFactorization , A:: AbstractSparseArray{Float64} , b, u, Pl, Pr,
140
141
maxiters:: Int , abstol,
141
142
reltol,
142
143
verbose:: Bool , assumptions:: OperatorAssumptions )
@@ -186,15 +187,15 @@ function LinearSolve.init_cacheval(alg::CHOLMODFactorization,
186
187
Pl, Pr,
187
188
maxiters:: Int , abstol, reltol,
188
189
verbose:: Bool , assumptions:: OperatorAssumptions ) where {T < :
189
- Union{Float32, Float64} }
190
+ BLASELTYPES }
190
191
PREALLOCATED_CHOLMOD
191
192
end
192
193
193
194
function LinearSolve. init_cacheval (alg:: NormalCholeskyFactorization ,
194
- A:: Union {AbstractSparseArray, LinearSolve. GPUArraysCore. AnyGPUArray,
195
- Symmetric{<: Number , <: AbstractSparseArray }}, b, u, Pl, Pr,
195
+ A:: Union {AbstractSparseArray{T} , LinearSolve. GPUArraysCore. AnyGPUArray,
196
+ Symmetric{T , <: AbstractSparseArray{T} }}, b, u, Pl, Pr,
196
197
maxiters:: Int , abstol, reltol, verbose:: Bool ,
197
- assumptions:: OperatorAssumptions )
198
+ assumptions:: OperatorAssumptions ) where {T <: BLASELTYPES }
198
199
LinearSolve. ArrayInterface. cholesky_instance (convert (AbstractMatrix, A))
199
200
end
200
201
0 commit comments