From 8a1cfe5bded1c55f32c4669a44cee0abe5a98d7e Mon Sep 17 00:00:00 2001 From: Christopher Rackauckas Date: Fri, 6 Oct 2023 09:39:41 +0200 Subject: [PATCH] Update default.jl --- src/default.jl | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/default.jl b/src/default.jl index 60cbfcc48..dfab2242d 100644 --- a/src/default.jl +++ b/src/default.jl @@ -170,7 +170,8 @@ function defaultalg(A, b, assump::OperatorAssumptions) DefaultAlgorithmChoice.RFLUFactorization #elseif A === nothing || A isa Matrix # alg = FastLUFactorization() - elseif usemkl && eltype(A) <: Union{Float64, Float32} + elseif usemkl && (A === nothing ? eltype(b) <: Union{Float32, Float64} : + eltype(A) <: Union{Float32, Float64}) DefaultAlgorithmChoice.MKLLUFactorization else DefaultAlgorithmChoice.LUFactorization @@ -179,7 +180,8 @@ function defaultalg(A, b, assump::OperatorAssumptions) DefaultAlgorithmChoice.QRFactorization elseif __conditioning(assump) === OperatorCondition.SuperIllConditioned DefaultAlgorithmChoice.SVDFactorization - elseif usemkl && eltype(A) <: Union{Float64, Float32} + elseif usemkl && (A === nothing ? eltype(b) <: Union{Float32, Float64} : + eltype(A) <: Union{Float32, Float64}) DefaultAlgorithmChoice.MKLLUFactorization else DefaultAlgorithmChoice.LUFactorization