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.
14
14
"""
15
15
struct AppleAccelerateLUFactorization <: AbstractFactorization end
16
16
17
-
17
+ # To make Enzyme happy, this has to be static
18
18
@static if ! Sys. isapple ()
19
+ const AA_IS_AVAILABLE = false
19
20
__appleaccelerate_isavailable () = false
20
21
else
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
31
29
end
32
30
end
33
31
You can’t perform that action at this time.
0 commit comments