Skip to content

Commit 16ee476

Browse files
Merge pull request #411 from SebastianM-C/patch-1
Don't use AppleAccelerate on number types that are not floats
2 parents 7527328 + 7f4d23b commit 16ee476

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
@@ -162,7 +162,9 @@ function defaultalg(A, b, assump::OperatorAssumptions)
162162
__conditioning(assump) === OperatorCondition.WellConditioned)
163163
if length(b) <= 10
164164
DefaultAlgorithmChoice.GenericLUFactorization
165-
elseif VERSION >= v"1.8" && appleaccelerate_isavailable()
165+
elseif VERSION >= v"1.8" && appleaccelerate_isavailable() &&
166+
(A === nothing ? eltype(b) <: Union{Float32, Float64} :
167+
eltype(A) <: Union{Float32, Float64})
166168
DefaultAlgorithmChoice.AppleAccelerateLUFactorization
167169
elseif (length(b) <= 100 || (isopenblas() && length(b) <= 500) ||
168170
(usemkl && length(b) <= 200)) &&
@@ -419,4 +421,4 @@ end
419421
end
420422
end
421423
ex = Expr(:if, ex.args...)
422-
end
424+
end

0 commit comments

Comments
 (0)