Skip to content

Commit 8a1cfe5

Browse files
Update default.jl
1 parent 602e8f2 commit 8a1cfe5

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/default.jl

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,8 @@ function defaultalg(A, b, assump::OperatorAssumptions)
170170
DefaultAlgorithmChoice.RFLUFactorization
171171
#elseif A === nothing || A isa Matrix
172172
# alg = FastLUFactorization()
173-
elseif usemkl && eltype(A) <: Union{Float64, Float32}
173+
elseif usemkl && (A === nothing ? eltype(b) <: Union{Float32, Float64} :
174+
eltype(A) <: Union{Float32, Float64})
174175
DefaultAlgorithmChoice.MKLLUFactorization
175176
else
176177
DefaultAlgorithmChoice.LUFactorization
@@ -179,7 +180,8 @@ function defaultalg(A, b, assump::OperatorAssumptions)
179180
DefaultAlgorithmChoice.QRFactorization
180181
elseif __conditioning(assump) === OperatorCondition.SuperIllConditioned
181182
DefaultAlgorithmChoice.SVDFactorization
182-
elseif usemkl && eltype(A) <: Union{Float64, Float32}
183+
elseif usemkl && (A === nothing ? eltype(b) <: Union{Float32, Float64} :
184+
eltype(A) <: Union{Float32, Float64})
183185
DefaultAlgorithmChoice.MKLLUFactorization
184186
else
185187
DefaultAlgorithmChoice.LUFactorization

0 commit comments

Comments
 (0)