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

Register 64-bit integer types on 32-bit machines.

parent 8807106a
No related branches found
No related tags found
No related merge requests found
...@@ -38,12 +38,23 @@ import re ...@@ -38,12 +38,23 @@ import re
from pyopencl.compyte.dtypes import ( from pyopencl.compyte.dtypes import (
get_or_register_dtype, TypeNameNotKnown, get_or_register_dtype, TypeNameNotKnown,
register_dtype, _fill_dtype_registry, register_dtype, dtype_to_ctype)
dtype_to_ctype)
_fill_dtype_registry(respect_windows=False, include_bool=False)
get_or_register_dtype("cfloat_t", np.complex64) def _register_types():
get_or_register_dtype("cdouble_t", np.complex128) from pyopencl.compyte.dtypes import _fill_dtype_registry
_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
if not is_64_bit:
get_or_register_dtype(["unsigned long", "unsigned long int"], np.uint64)
get_or_register_dtype(["signed long", "signed long int", "long int"], np.int64)
_register_types()
......
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