thanks -- I wasn't aware GPUArray supported any slicing at all.
However, my slice index is boolean which still does not seem to be
supported (is it planned?). Any other ideas?
On Wed, Feb 23, 2011 at 9:24 AM, Lev Givon <lev(a)columbia.edu> wrote:
Received from Thomas Wiecki on Wed, Feb 23, 2011 at
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
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.
How about the following?