Intel® SDK for OpenCL* Applications is a software developer environment for OpenCL* applications that includes access to OpenCL* runtime and a compiler for Intel platforms on both Intel® Processors and Intel® HD graphics, OpenCL* headers and libraries, code samples, product documentation, and development tools.
The samples provide source code examples, accompanied with whitepapers to help you get started with Intel® SDK for OpenCL* Applications. The samples are available with different level of complexity and cover different domains. The samples can target both CPU and Intel HD Graphics.
Beyond general OpenCL* programming the samples feature the examples of optimizations, efficient usage of extensions, etc.
The rest of document covers the samples in details and also provide some hints on samples structure and compilation topics.
List of Samples
For information on samples for Linux* OS and for Intel® Xeon Phi™ coprocessor see http://software.intel.com/en-us/articles/intel-sdk-for-opencl-applications-xe-samples-getting-started/.
Sample Name | Complexity | Supported Devices | Description |
---|---|---|---|
Novice | CPU/Intel® HD Graphics | The sample demonstrates basic ways of measuring the performance of OpenCL* kernels in an application. It also demonstrates several simple optimizations. Some of optimizations are rather CPU-specific, while others are more general. | |
Novice | CPU/Intel® HD Graphics | The sample demonstrates how to implement efficient median filter with OpenCL*. This implementation relies on auto-vectorization performed by Intel® SDK for OpenCL* Applications compiler. This kernel code effectively minimizes number of color buffer accesses, removes synchronization points, and uses data-level parallelism. | |
Novice | CPU/Intel® HD Graphics | The sample demonstrates efficient implementation of high dynamic range (HDR) tone mapping. The algorithm by OpenEXR* community is implemented in OpenCL*. | |
Intermediate | CPU and Intel® HD Graphics simultaneously | This sample features Intel NBody demo from SIGGRPAH 2012. The NBody Simulation features a load balancing approach to compute NBody across both CPU and Intel® HD Graphics. This sample illustrates the basic principles of how to be efficient when working with both devices simultaneously. | |
Intermediate | CPU/Intel® HD Graphics | This sample demonstrates efficient implementation of sorting routine in OpenCL*. Specifically, the sample utilizes properties of bitonic sorting networks for efficient SIMD-level parallelism via using OpenCL* vector data types. | |
Hybrid HDR Tone Mapping for Post Processing Multi-Device Version | Intermediate | CPU and Intel® HD Graphics simultaneously | This version of original Tone-Mapping sample features multi-device support, specifically the simultaneous usage of CPU and Processor Graphics OpenCL* devices. It also shows some basic approach to the load-balancing, resources sharing, etc. |
Intermediate | CPU/Intel® HD Graphics | The sample demonstrates the efficient implementation in OpenCL* of the high dynamic range (HDR) rendering with God Rays (crepuscular rays) effect. This implementation optimizes rendering passes by sharing intermediate data between pixels during pixel processing, which improves the performance, and reduces kernel data traffic. | |
OpenCL* and Microsoft DirectX* API Video Acceleration Surface Sharing | Intermediate | Intel® HD Graphics only | The samples demonstrates how to use Microsoft DXVA* and Intel® SDK for OpenCL* Applications together for efficient video post processing and fast video rendering. It relies on Microsoft® DXVA for hardware-accelerated rendering, while Intel® OpenCL* implementation is used video post processing. |
Intermediate | Intel® HD Graphics only | The sample demonstrates how to use the Microsoft Direct3D* and Intel® SDK for OpenCL* Applications together in the most efficient manner. Specifically it integrates data processing using the OpenCL* on the Intel HD Graphics and rendering with Microsoft® DirectX while featuring zero-copy interoperability. | |
Advanced | Intel® HD Graphics only | The sample demonstrates how to use Intel® Media SDK and Intel® SDK for OpenCL* Applications together in the most efficient fashion. Specifically the Intel® Media SDK performs hardware-accelerated video decoding while OpenCL* is used on the Intel HD Graphics for fast post-processing. | |
Advanced | CPU/Intel® HD Graphics | The sample demonstrates shallow water solver implemented in OpenCL*. It relies on flux splitting method for solving the approximated Navier-Stokes equations. The algorithm operates on 2D maps of velocity and height, calculates updated maps for the next time step, and uses the updated maps for visualization. |
Using the Samples
Intel® SDK for OpenCL* Applications samples are supported on Microsoft Windows* operating systems on Microsoft Visual Studio* software version 2008, 2010, and 2012. Each sample offers Debug and Release configurations and separate projects/configurations for x86 and x64 respectively.
The Intel® SDK for OpenCL* Applications is required to compile and run these code samples. Download your free copy of the Intel® SDK for OpenCL* Applications at www.intel.com/software/opencl.
Building a Sample Application
A separate per-sample solution file (located in respective sample directories) contains the corresponding Microsoft Visual Studio* sample projects. Also full samples package offer solution files that contains projects for basic samples:
- Bitonic Sort
- HDR Rendering with God Rays effect
- Median Filter
- HDR Tone Mapping for Post Processing
- Hybrid HDR Tone Mapping for Post Processing Multi-Device Version
- OpenCL* Optimizations.
The Shallow Water 3D Fluid Simulation sample is available in a different solution (located in the sample directory), similarly OpenCL* and Microsoft Direct3D* 10 API Interoperability has a separate solution file in its folder. Finally both resource sharing samples (DXVA Surface Sharing and Direct3D Interoperability) share the same solution file.
Property Sheets
For include and library routine, the samples projects rely (by use of common vsprops
files) on INTELOCLSDKROOT
environment variable which is automatically set during SDK installation. The vsprops
files are located in "templates" folder.