File tree Expand file tree Collapse file tree 1 file changed +9
-11
lines changed Expand file tree Collapse file tree 1 file changed +9
-11
lines changed Original file line number Diff line number Diff line change @@ -14,20 +14,18 @@ to avoid allocations and does not require libblastrampoline.
1414"""
1515struct AppleAccelerateLUFactorization <: AbstractFactorization end
1616
17-
17+ # To make Enzyme happy, this has to be static
1818@static if ! Sys. isapple ()
19+ const AA_IS_AVAILABLE = false
1920 __appleaccelerate_isavailable () = false
2021else
21- function __appleaccelerate_isavailable ()
22- libacc_hdl = Libdl. dlopen_e (libacc)
23- if libacc_hdl == C_NULL
24- return false
25- end
26-
27- if dlsym_e (libacc_hdl, " dgetrf_" ) == C_NULL
28- return false
29- end
30- return true
22+ @static if Libdl. dlopen_e (libacc) == C_NULL
23+ __appleaccelerate_isavailable () = false
24+ end
25+ @static if dlsym_e (Libdl. dlopen_e (libacc), " dgetrf_" ) == C_NULL
26+ __appleaccelerate_isavailable () = false
27+ else
28+ __appleaccelerate_isavailable () = true
3129 end
3230end
3331
You can’t perform that action at this time.
0 commit comments