Example #1
0
 def get_dtype_registry(self):
     from loopy.target.c.compyte.dtypes import (
             DTypeRegistry, fill_registry_with_c_types)
     result = DTypeRegistry()
     fill_registry_with_c_types(result, respect_windows=False,
             include_bool=True)
     return DTypeRegistryWrapper(result)
Example #2
0
    def get_dtype_registry(self):
        from loopy.target.c.compyte.dtypes import DTypeRegistry, fill_with_registry_with_c_types
        result = DTypeRegistry()
        fill_with_registry_with_c_types(result, respect_windows=False)

        # complex number support left out

        # CL defines 'long' as 64-bit
        result.get_or_register_dtype(
                ["unsigned long", "unsigned long int"], np.uint64)
        result.get_or_register_dtype(
                ["signed long", "signed long int", "long int"], np.int64)

        _register_vector_types(result)

        return result
Example #3
0
 def get_dtype_registry(self):
     from loopy.target.c.compyte.dtypes import (
         DTypeRegistry, fill_registry_with_c99_stdint_types,
         fill_registry_with_c99_complex_types)
     result = DTypeRegistry()
     fill_registry_with_c99_stdint_types(result)
     fill_registry_with_c99_complex_types(result)
     return DTypeRegistryWrapper(result)
Example #4
0
    def get_dtype_registry(self):
        from loopy.target.c.compyte.dtypes import (
            DTypeRegistry, fill_registry_with_opencl_c_types)

        result = DTypeRegistry()
        fill_registry_with_opencl_c_types(result)

        # no complex number support--needs PyOpenCLTarget

        _register_vector_types(result)

        return result
Example #5
0
    def get_dtype_registry(self):
        from loopy.target.c.compyte.dtypes import (
            DTypeRegistry, fill_registry_with_opencl_c_types)

        result = DTypeRegistry()
        fill_registry_with_opencl_c_types(result)

        # no complex number support--needs PyOpenCLTarget

        _register_vector_types(result)

        if self.atomics_flavor == "cl1":
            return DTypeRegistryWrapperWithCL1Atomics(result)
        else:
            raise NotImplementedError("atomics flavor: %s" %
                                      self.atomics_flavor)