Skip to content

Commit

Permalink
Guard BLAS defaults more, allowing only Array and BLASFloats
Browse files Browse the repository at this point in the history
  • Loading branch information
ChrisRackauckas committed Oct 30, 2024
1 parent afc7a12 commit 3c4a07b
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/default.jl
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,8 @@ function defaultalg(A, b, assump::OperatorAssumptions{Bool})
__conditioning(assump) === OperatorCondition.WellConditioned)
if length(b) <= 10
DefaultAlgorithmChoice.RFLUFactorization
elseif appleaccelerate_isavailable()
elseif appleaccelerate_isavailable() && b isa Array &&
eltype(b) <: Union{Float32, Float64, ComplexF32, ComplexF64}
DefaultAlgorithmChoice.AppleAccelerateLUFactorization
elseif (length(b) <= 100 || (isopenblas() && length(b) <= 500) ||
(usemkl && length(b) <= 200)) &&
Expand All @@ -188,7 +189,8 @@ function defaultalg(A, b, assump::OperatorAssumptions{Bool})
DefaultAlgorithmChoice.RFLUFactorization
#elseif A === nothing || A isa Matrix
# alg = FastLUFactorization()
elseif usemkl
elseif usemkl && b isa Array &&
eltype(b) <: Union{Float32, Float64, ComplexF32, ComplexF64}
DefaultAlgorithmChoice.MKLLUFactorization
else
DefaultAlgorithmChoice.LUFactorization
Expand Down

0 comments on commit 3c4a07b

Please sign in to comment.