Mercurial > hg > Members > yuuhi > OpenCL
view parallel_Prefix_Sum_Example/ReadMe.txt @ 2:ccea4e6a1945
add OpenCL example
author | Yuhi TOMARI <yuhi@cr.ie.u-ryukyu.ac.jp> |
---|---|
date | Tue, 22 Jan 2013 23:19:41 +0900 |
parents | |
children |
line wrap: on
line source
### OpenCL Parallel Prefix Sum (aka Scan) Example ### =========================================================================== DESCRIPTION: 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. Note that the .cl compute kernel file(s) are loaded and compiled at runtime. The example source assumes that these files are in the same path as the built executable. For simplicity, this example is intended to be run from the command line. If run from within XCode, open the Run Log (Command-Shift-R) to see the output. Alternatively, run the applications from within a Terminal.app session to launch from the command line. =========================================================================== BUILD REQUIREMENTS: Mac OS X v10.6 or later =========================================================================== RUNTIME REQUIREMENTS: Mac OS X v10.6 or later with OpenCL 1.0 =========================================================================== PACKAGING LIST: ReadMe.txt scan.c scan_kernel.cl scan.xcodeproj =========================================================================== CHANGES FROM PREVIOUS VERSIONS: Version 1.0 - First version. =========================================================================== Copyright (C) 2008 Apple Inc. All rights reserved.