But if i modify the kernel in this mode: const int i = threadIdx.x+2 dest[i]=i;
the result is: [1 0 2 3 4 5 6 7 8 9] while, in my opinion,should be [0,0,2,3,4,5,6,7,8,9] (confirmed by C code). why? > Date: Tue, 10 Jul 2012 23:27:27 +1000 > Subject: Re: [PyCUDA] Thread Problem > From: [email protected] > To: [email protected] > CC: [email protected] > > On Tue, Jul 10, 2012 at 11:22 PM, Andrea Cesari > <[email protected]> wrote: > > If i understood correctly dt.dtype_to_ctype(type) tell me the corresponding > > variable type on python? > > Not python per se, but numpy types (the ones you get from numpy > arrays' dtype field). dtype_to_ctype() takes numpy datatype object and > returns C equivalent. NAME_TO_DTYPE provides correspondence in other > direction, i.e. from C types to numpy datatypes.
_______________________________________________ PyCUDA mailing list [email protected] http://lists.tiker.net/listinfo/pycuda
