Results 1 to 2 of 2

Thread: Is there any complete tutorial for sum all elements in an array/vector?

  1. #1
    Newbie
    Join Date
    Aug 2014
    Posts
    1

    Is there any complete tutorial for sum all elements in an array/vector?

    Hello guys,

    I'm a novice to opencl. Basically, this is my second day. Someone wants me get familiar with opencl by implementing "get the summation of cubes of each element in an array".

    I found that get the cube of each element is quite easy. However, I have no idea about how to get the summation.

    I checked on Google, it seems I need something called "reduction" and I can't find full tutorial(both kernel and host) program.

    Also, if you have other good examples, please tell me. I definitely need your help.

    Thanks in advance.

  2. #2
    Senior Member
    Join Date
    Oct 2012
    Posts
    115
    You can find a good introduction to reduction with OpenCL here:

    http://developer.amd.com/resources/d...le-reductions/

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •