On Samstag 05 September 2009, Roger Pau Monné wrote: > Hello, > I'm trying to pass a multidimensional array as a parameter of a kernel and > I'm having some trouble. The kernel compiles and runs fine, but it seems to > not be able to update the array (or read_buffer is not able to retrieve the > values). I've made a simple example to show this problem, it is attached to > the message. Does someone know where the problem might be?
Hmm, first off, you've uncovered a bug in Nvidia's CL implementation, which simply fails to compile your kernel: Error: ptxas ptx input, line 48; error : Unknown symbol 'demo_param_0' But even if it did, n-dimensional arrays don't map to pointer-to-pointer structures. The easiest way is to declare them as "float *" and do the index math yourself, i.e. demo[i+5*gid] = 1; Fixed version here: http://git.tiker.net/pyopencl.git/blob/HEAD:/examples/narray.py Andreas
signature.asc
Description: This is a digitally signed message part.
_______________________________________________ PyOpenCL mailing list [email protected] http://tiker.net/mailman/listinfo/pyopencl_tiker.net
