PDA

View Full Version : Computing Mean values of a set of vectors ?



wonwoolee
03-17-2011, 08:18 PM
Hello.

I'm looking for a nice way to compute the mean vector of a set of 3D vectors on GPU.

I can do it on CPU after reading the data back to CPU but readback takes some time...

My data is composed as an array of 3D vectors and the length of the array is 25600. Is there any good method to compute a mean vector from a set of vectors on GPU ?

ibbles
03-18-2011, 12:22 AM
This sounds like a straight-forward reduction. Many OpenCL sample sets includes an example of this, and you can also have a look at http://developer.amd.com/documentation/articles/pages/opencl-optimization-case-study-simple-reductions.aspx. Haven't read the article, but the title sounds about right.

wonwoolee
03-18-2011, 01:40 AM
Thanks, the information at the link is very useful !!