Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Use more CL-friendly type names in type registry
  • Loading branch information
inducer committed Aug 17, 2015
1 parent a177ba4 commit 293ee46
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 11 deletions.
2 changes: 1 addition & 1 deletion pyopencl/compyte
Submodule compyte updated 1 files
+27 −2 dtypes.py
13 changes: 3 additions & 10 deletions pyopencl/tools.py
Expand Up @@ -45,21 +45,14 @@


def _register_types():
from pyopencl.compyte.dtypes import _fill_dtype_registry
import struct
from pyopencl.compyte.dtypes import (
TYPE_REGISTRY, fill_registry_with_opencl_c_types)

_fill_dtype_registry(respect_windows=False, include_bool=False)
fill_registry_with_opencl_c_types(TYPE_REGISTRY)

get_or_register_dtype("cfloat_t", np.complex64)
get_or_register_dtype("cdouble_t", np.complex128)

is_64_bit = struct.calcsize('@P') * 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()


Expand Down

0 comments on commit 293ee46

Please sign in to comment.