Received from Thomas Wiecki on Wed, Feb 23, 2011 at 09:04:21AM EST: > Hi, > > I want to run element-wise computations on different parts of an > array. Loading each part of the array to device mem when needed turned > out to use up a lot of time and not really speed things up compared to > cpu. Instead, I want to once load the data array into device mem and > provide pointers to which elements to look at (I do have the numpy > view/slice of the array). I looked into different ways of doing this > but can't seem to find the right approach, any help would be > appreciated. > > ElementwiseKernel seems to support range and slicing now, however, my > code is (cuda) c and I import it as a SourceModule which probably > means I can't use the ElementwiseKernel approach. > > -Thomas
How about the following? http://pastebin.com/D6zhjBSC L.G. _______________________________________________ PyCUDA mailing list [email protected] http://lists.tiker.net/listinfo/pycuda
