Hi Andrea,
On Tue, Jul 10, 2012 at 10:41 PM, Andrea Cesari
<[email protected]> wrote:
> dest=numpy.zeros(lung_vett,dtype=numpy.int16);
Should be int32. When in doubt, use
pycuda.compyte.dtypes.dtype_to_ctype() and
pycuda.compyte.dtypes.NAME_TO_DTYPE (there's no ctype_to_dtype()
function at the moment):
>>> import numpy
>>> import pycuda.autoinit
>>> import pycuda.compyte.dtypes as dt
>>> dt.dtype_to_ctype(numpy.float32)
'float'
>>> dt.dtype_to_ctype(numpy.int32)
'int'
>>> dt.dtype_to_ctype(numpy.int16)
'short'
>>> dt.NAME_TO_DTYPE['int']
dtype('int32')
_______________________________________________
PyCUDA mailing list
[email protected]
http://lists.tiker.net/listinfo/pycuda