Last Revision: | |
Build Requirements: | Mac OS X v10.6, Xcode 3.2. |
Runtime Requirements: | Mac OS X v10.6 |
This example shows how to perform an efficient parallel prefix sum (aka Scan) using OpenCL. Scan is a common data parallel primitive which can be used for variety of different operations -- this example uses local memory for storing partial sums and avoids memory bank conflicts on architectures which serialize memory operations that are serviced on the same memory bank by offsetting the loads and stores based on the size of the local group and the number of memory banks (see appropriate macro definition). As a result, this example requires that the local group size > 1.
Last updated: 2009-09-23