提交 6fcc93a9 authored 作者: Frederic Bastien's avatar Frederic Bastien

Allow kernel to have signature type of int32, ...

上级 e761a11b
......@@ -270,13 +270,14 @@ class Kernel(object):
def get_ctype(dtype):
if dtype is gpuarray.GpuArray:
return "gpudata *"
elif isinstance(dtype, np.dtype):
return 'npy_' + dtype.name
elif dtype == gpuarray.SIZE:
return "size_t"
elif dtype == gpuarray.SSIZE:
return "ssize_t"
else:
if not isinstance(dtype, np.dtype):
dtype = np.dtype(dtype)
dtype = np.dtype(dtype)
return 'npy_' + dtype.name
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论