Hi guys,

I have looked for answers in the documentation, but no luck, so here
goes.

I have data stored in a buffer that already exists on the device. I
would like to do a reduction of that data, in this case, I would like to
find the maximum value of a large 2D array (assigned as a buffer with
C-type addressing). 

By looking in the documentation there exists a reduction feature for
working on pyOpenCL arrays, so the question is, how do I do either of
the following:

A) Pass the buffer instance directly to the reduce function.

or

B) Create a pyopencl.array instance and pass it to a kernel as an
argument. I can then fill it with whatever data I please whilst
operating on the device(I will have to do operations on the data before
finding the max value so this is not a wasted step). I can then, on the
host side, pass the pyopencl.array to the reduce function and get my max
value of the array.

or

C) A far better method that I haven't even thought of??

I hope that made sense.

Many thanks,

Daryl


_______________________________________________
PyOpenCL mailing list
[email protected]
http://lists.tiker.net/listinfo/pyopencl

Reply via email to