Skip to content

Commit

Permalink
Merge pull request #411 from SebastianM-C/patch-1
Browse files Browse the repository at this point in the history
Don't use AppleAccelerate on number types that are not floats
  • Loading branch information
ChrisRackauckas authored Oct 31, 2023
2 parents 7527328 + 7f4d23b commit 16ee476
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 @@ -162,7 +162,9 @@ function defaultalg(A, b, assump::OperatorAssumptions)
__conditioning(assump) === OperatorCondition.WellConditioned)
if length(b) <= 10
DefaultAlgorithmChoice.GenericLUFactorization
elseif VERSION >= v"1.8" && appleaccelerate_isavailable()
elseif VERSION >= v"1.8" && appleaccelerate_isavailable() &&
(A === nothing ? eltype(b) <: Union{Float32, Float64} :
eltype(A) <: Union{Float32, Float64})
DefaultAlgorithmChoice.AppleAccelerateLUFactorization
elseif (length(b) <= 100 || (isopenblas() && length(b) <= 500) ||
(usemkl && length(b) <= 200)) &&
Expand Down Expand Up @@ -419,4 +421,4 @@ end
end
end
ex = Expr(:if, ex.args...)
end
end

0 comments on commit 16ee476

Please sign in to comment.