Oh great!! Now all works fine! Thanks for the advice. If i understood correctly dt.dtype_to_ctype(type) tell me the corresponding variable type on python?
> Date: Tue, 10 Jul 2012 23:07:07 +1000 > Subject: Re: [PyCUDA] Thread Problem > From: [email protected] > To: [email protected] > CC: [email protected] > > 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
