def _register_types(): from pyopencl.compyte.dtypes import (TYPE_REGISTRY, fill_registry_with_opencl_c_types) fill_registry_with_opencl_c_types(TYPE_REGISTRY) get_or_register_dtype("cfloat_t", np.complex64) get_or_register_dtype("cdouble_t", np.complex128)
def _register_types(): from pyopencl.compyte.dtypes import ( TYPE_REGISTRY, fill_registry_with_opencl_c_types) fill_registry_with_opencl_c_types(TYPE_REGISTRY) get_or_register_dtype("cfloat_t", np.complex64) get_or_register_dtype("cdouble_t", np.complex128)
def _register_types(): 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)
def _register_types(): 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)
def get_or_register_dtype(self, names, dtype=None): from pyopencl.compyte.dtypes import get_or_register_dtype return get_or_register_dtype(names, dtype)
import numpy as np from decorator import decorator import pyopencl as cl from pytools import memoize, memoize_method import re from pyopencl.compyte.dtypes import ( get_or_register_dtype, TypeNameNotKnown, register_dtype, _fill_dtype_registry, dtype_to_ctype) _fill_dtype_registry(respect_windows=False) get_or_register_dtype("cfloat_t", np.complex64) get_or_register_dtype("cdouble_t", np.complex128) bitlog2 = cl.bitlog2 PooledBuffer = cl.PooledBuffer from pyopencl._cl import _tools_DeferredAllocator as DeferredAllocator from pyopencl._cl import _tools_ImmediateAllocator as ImmediateAllocator class CLAllocator(DeferredAllocator): def __init__(self, *args, **kwargs): from warnings import warn