提交 b3af29cc authored 作者: Arnaud Bergeron's avatar Arnaud Bergeron

Fix problem with string dtypes.

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