File tree 2 files changed +6
-2
lines changed
2 files changed +6
-2
lines changed Original file line number Diff line number Diff line change 7
7
import platform
8
8
9
9
_is_osx_arm64 = platform .machine () == "arm64"
10
+ _is_ppc64le = platform .machine () == "ppc64le"
10
11
_c_float = ffi .typeof ("float" )
11
12
_c_double = ffi .typeof ("double" )
12
13
13
14
14
- if _is_osx_arm64 :
15
+ if _is_osx_arm64 or _is_ppc64le :
15
16
16
17
def vararg (val ):
17
18
# Interpret float as int32 and double as int64
@@ -25,6 +26,8 @@ def vararg(val):
25
26
val = ffi .cast ("int64_t" , val )
26
27
# Cast variadic argument as char * to force it onto the stack where ARM64 expects it
27
28
# https://developer.apple.com/documentation/xcode/writing-arm64-code-for-apple-platforms
29
+ #
30
+ # The same fix *may* work for ppc64le
28
31
return ffi .cast ("char *" , val )
29
32
30
33
else :
Original file line number Diff line number Diff line change 6
6
7
7
is_win = sys .platform .startswith ("win" )
8
8
is_arm64 = platform .machine () == "arm64"
9
+ is_ppc64le = platform .machine () == "ppc64le" # Use same header as arm64, which *may* work
9
10
thisdir = os .path .dirname (__file__ )
10
11
11
12
ffibuilder = FFI ()
30
31
header = "suitesparse_graphblas.h"
31
32
if is_win :
32
33
header = "suitesparse_graphblas_no_complex.h"
33
- if is_arm64 :
34
+ if is_arm64 or is_ppc64le :
34
35
header = "suitesparse_graphblas_arm64.h"
35
36
gb_cdef = open (os .path .join (thisdir , header ))
36
37
You can’t perform that action at this time.
0 commit comments