Skip to content
Snippets Groups Projects
Commit 1062e52f authored by Andreas Klöckner's avatar Andreas Klöckner
Browse files

Merge pull request #37 from yuyichao/master

Use the documented struct.calcsize to determine machine word size for better pypy support.
parents 3e825e66 fcd83633
No related branches found
No related tags found
No related merge requests found
......@@ -42,13 +42,14 @@ from pyopencl.compyte.dtypes import ( # noqa
def _register_types():
from pyopencl.compyte.dtypes import _fill_dtype_registry
import struct
_fill_dtype_registry(respect_windows=False, include_bool=False)
get_or_register_dtype("cfloat_t", np.complex64)
get_or_register_dtype("cdouble_t", np.complex128)
is_64_bit = tuple.__itemsize__ * 8 == 64
is_64_bit = struct.calcsize('@P') * 8 == 64
if not is_64_bit:
get_or_register_dtype(
["unsigned long", "unsigned long int"], np.uint64)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment