Computing Mean values of a set of vectors ?

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 ?

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.

Thanks, the information at the link is very useful !!