OpenCL (Open Computing Language) is an open standard for leveraging the computing power of GPUs and multi-core CPUs. OpenCL makes it possible for you to write cross-platform code that can execute on a variety of CPUs and GPUs without having to use the language of a specific vendor or to map general-purpose code to a 3D graphics API such as OpenGL or DirectX. OpenCL provides an abstraction layer that allows your general-purpose code to run in parallel on all the GPU and CPU cores on a system. The OpenCL technology is specifically designed for use with applications that need extra computing power, that must be portable, and that need to respond readily to evolving improvements in hardware. OpenCL can benefit scientific applications, image processing, signal processing, and other programs that require large amounts of parallel processing.
OpenCL Programming Guide for Mac OS X explains how to use OpenCL to exploit the computing power that resides in the many processing cores in a Macintosh computer’s graphics processing unit (GPU) and central processing unit (CPU).
Read “OpenCL Overview” to find out exactly what OpenCL is and whether it will provide benefits to your application. After that, if you want to learn how to use OpenCL, this document will provide some context, basic concepts, and programming samples that will make it easier to learn how to use the OpenCL framework to create an OpenCL-enabled application. The document provides techniques and tips for establishing a workflow and achieving the best performance possible on the Mac OS X platform.
This guide assumes that you know C and have access to The OpenCL Specification. Although this guide does discuss many key OpenCL API functions, it does not provide detailed information on the OpenCL API or the OpenCL-C programming language.
This programming guide contains the following chapters:
“OpenCL Overview” provides definitions of OpenCL terminology and discusses fundamental concepts for understanding how to use the OpenCL framework.
“OpenCL on the Mac Platform” describes how OpenCL is implemented on Mac OS X.
“The OpenCL Development Process and Workflow” describes from start to finish the steps involved in making an OpenCL-enabled application.
“OpenCL Memory Objects” explains how to package application data in memory objects for later processing in kernels.
“Basic Programming Sample” provides a programming sample that illustrates all the essential steps in using OpenCL.
"Programming with OpenCL-C” provides a brief introduction to the use of the OpenCL-C language. To be provided.
"Improving Performance” offers tips and tricks for obtaining the best performance for an OpenCL program. To be provided.
"Using OpenCL with OpenGL” describes how to share data structures between OpenCL and OpenGL. To be provided.
Please see the following for more information on OpenCL:
The OpenCL Specification, available from the Khronos Group at http://www.khronos.org/registry/cl/.
Last updated: 2009-06-10