OpenCL Parallel Prefix Sum (aka Scan) Example

Last Revision:
Version 1.5, 2017-09-19
Fix path issue that prevented loading the input code.
(Full Revision History)
Build Requirements:
Mac OS X v10.6 or later, Xcode 3.2 or later.
Runtime Requirements:
Mac OS X v10.6 or later

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.