File tree Expand file tree Collapse file tree 2 files changed +6
-2
lines changed Expand file tree Collapse file tree 2 files changed +6
-2
lines changed Original file line number Diff line number Diff line change 77import platform
88
99_is_osx_arm64 = platform .machine () == "arm64"
10+ _is_ppc64le = platform .machine () == "ppc64le"
1011_c_float = ffi .typeof ("float" )
1112_c_double = ffi .typeof ("double" )
1213
1314
14- if _is_osx_arm64 :
15+ if _is_osx_arm64 or _is_ppc64le :
1516
1617 def vararg (val ):
1718 # Interpret float as int32 and double as int64
@@ -25,6 +26,8 @@ def vararg(val):
2526 val = ffi .cast ("int64_t" , val )
2627 # Cast variadic argument as char * to force it onto the stack where ARM64 expects it
2728 # https://developer.apple.com/documentation/xcode/writing-arm64-code-for-apple-platforms
29+ #
30+ # The same fix *may* work for ppc64le
2831 return ffi .cast ("char *" , val )
2932
3033else :
Original file line number Diff line number Diff line change 66
77is_win = sys .platform .startswith ("win" )
88is_arm64 = platform .machine () == "arm64"
9+ is_ppc64le = platform .machine () == "ppc64le" # Use same header as arm64, which *may* work
910thisdir = os .path .dirname (__file__ )
1011
1112ffibuilder = FFI ()
3031header = "suitesparse_graphblas.h"
3132if is_win :
3233 header = "suitesparse_graphblas_no_complex.h"
33- if is_arm64 :
34+ if is_arm64 or is_ppc64le :
3435 header = "suitesparse_graphblas_arm64.h"
3536gb_cdef = open (os .path .join (thisdir , header ))
3637
You can’t perform that action at this time.
0 commit comments