From 7f4d23bf5c75ac61ac9741522186d3ce8ba4e9f4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Miclu=C8=9Ba-C=C3=A2mpeanu?= <31181429+SebastianM-C@users.noreply.github.com> Date: Tue, 31 Oct 2023 01:35:09 +0200 Subject: [PATCH] Don't use AppleAccelerate on number types that are not floats --- src/default.jl | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/default.jl b/src/default.jl index 05a46020a..446824dbc 100644 --- a/src/default.jl +++ b/src/default.jl @@ -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)) && @@ -419,4 +421,4 @@ end end end ex = Expr(:if, ex.args...) -end \ No newline at end of file +end