Hi all,

The following code fails using the current source of pycuda.

-----

import numpy

import pycuda.autoinit
import pycuda.gpuarray

a_gpu = pycuda.gpuarray.zeros(10, dtype = numpy.int32)
a_gpu.astype(numpy.uint16)

-----

The problem is that pycuda.tools.dtype_to_ctype returns "short unsigned int" for numpy.uint16, whereas pycuda.tools.parse_c_arg checks only for "unsigned short" and "unsigned short int". This is easily fixable by adding a check for "short unsigned int" to parse_c_arg.

Cheers,

Irwin

_______________________________________________
PyCUDA mailing list
[email protected]
http://lists.tiker.net/listinfo/pycuda

Reply via email to