1. Download
You can download the gzipped tarball of the latest SNU-SAMSUNG OpenCL Framework distribution here.
2. Build
Put the gzipped tarball in some work directory and untar it. This example uses a work directory called OpenCL.
$user@computer:~/OpenCL$ tar zxvf SNU-SAMSUNG_OpenCL_Framework.1.0.tar.gz
Edit setenv.sh and execute it.
user@computer:~/OpenCL$ vim setenv.sh ... 66 ################################################### 67 # Set up tool and target definitions based on above 68 69 # Common 70 $EXPORT_CMD CL_TOP="$HOME/OpenCL"<-- modify CL_TOP to your work directory ...
Build the SNU-SAMSUNG OpenCL framework distribution.
user@computer:~/OpenCL$ source setenv.sh ------------------------------------------------------------ SNU-SAMSUNG OpenCL environments ------------------------------------------------------------ Host OS Detected : Linux Host CPU Detected : ppc SNU-SAMSUNG OpenCL library : lnx_ppc/libsnusamsung_opencl.a SNU-SAMSUNG OpenCL CL_TOP : /home/user/OpenCL ------------------------------------------------------------
3. Run
Build a sample OpenCL application (square).
user@computer:~/OpenCL$ ./makeall.sh
Run the application.
user@computer:~/OpenCL/apps/square$ ./square ====================================================== SNU-SAMSUNG OpenCL Runtime version 1.0 (build : 21:35:51, Feb 3 2010) ------------------------------------------------------ Device[cpu] : Available CU(s) : 4 Device[Cell(spu)] : Available CU(s) : 16 ====================================================== Computed '262144/262144' correct values! Computed '0/262144' incorrect values! 0.009331 seconds elapsed user@computer:~/OpenCL/apps/square$