On Sun, 19 Jun 2011 20:30:01 +0100, Irwin Zaid <[email protected]> wrote: > 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.
Thanks for the report. Fixed in a few more variants in PyCUDA and PyOpenCL git. Andreas
pgpBxs1XY2srk.pgp
Description: PGP signature
_______________________________________________ PyOpenCL mailing list [email protected] http://lists.tiker.net/listinfo/pyopencl
