About this Document
The intention of this guide is to provide quick steps to create, build, debug, and analyze OpenCL™ applications with the OpenCL™ Code Builder, a part of Intel® Integrated Native Development Environment (Intel® INDE)
Intel® INDE provides integrated development environment for Windows* and Android* applications for mobile and desktop client systems. If you wish to target your OpenCL applications for Linux systems or other server and embedded configurations, additional OpenCL Code Builder options are available athttps://software.intel.com/en-us/intel-opencl.
About the OpenCL™ Code Builder
OpenCL™ Code Builder is a software tool suite that enables development of OpenCL applications via well-known integrated development environments, targeting the Intel® Architecture processors with the Intel® Processor Graphics.
OpenCL™ Code Builder has the following capabilities:
Which Version of the OpenCL™ Code Builder to Pick?
Depending on your target operating systems and hardware set, select between the Intel® INDE and other versions of the OpenCL™ Code Builder.
The Intel® INDE version of the OpenCL™ Code Builder provides the following features:
For a full list of features, refer to the Intel® INDE version of the Code Builder Release Notes.
Are you looking for more configurations, like OpenCL support for Intel® Processor Graphics for Linux* OS? Use the OpenCL™ Code Builder available with the Intel® Media Server Studio. See even more configurations at https://software.intel.com/en-us/intel-opencl
Prerequisites
The following components must be installed on the system to ensure the Code Builder components work:
For help on installing the product refer to the "Installation Guidelines" sections in release notes.
Quickly Install and Develop with the OpenCL™ Code Builder
Intel® INDE provides a comprehensive toolset for developing applications targeting both CPU and GPUs, enriching the development experience of an OpenCL developer. Yet, if you got used to work with the legacy Intel® SDK for OpenCL™ Applications, you may still be looking for the same capabilities to develop only the OpenCL code with the same tools. This option is supported.
To get started and build your first OpenCL code quickly, you can follow these steps and install only the OpenCL™ Code Builder component of Intel INDE (for more detailed version, see "Getting Started with OpenCL Development on Windows with Intel® INDE"),
This will install OpenCL Code Builder, including Visual Studio and Eclipse plug-ins.
Now you are ready to start developing your OpenCL code
Getting Started with the OpenCL™ Code Builder Tools
A simple way to get started with the OpenCL™ Code Builder is using its Visual Studio* plug-in.
Check OpenCL™ Platform Availability
Right after installing the OpenCL™ Code Builder, you can check availability of the OpenCL platform on your system. To do so,
1. Run Visual Studio.
2. Go to CODE-BUILDER > Platform Info…
As a result you should see the Platform Info window with the list of available platforms and your hardware properties.
Build an OpenCL™ Kernel
Next step is to build an OpenCL kernel using the Visual Studio plug-in.
In this example we use a ready code sample from the list of Intel’s OpenCL code samples to test the plug-in.
To build a sample application
1. Download the OpenCL Platform Capabilities Viewer Sample or any other available code sample.
2. Unpack the archive to the destination of your choice.
3. Select the solution file corresponding to your Visual Studio* version.
4. Press Ctrl+Shift+B.
In case of a successful build operation, you receive the following output:
In case of a failure, you receive error messages. For example:
You can develop an OpenCL kernel yourself.
See the User Manual for more information about developing kernels using the Code Builder plug-in for Visual Studio.
Debug and Analyze OpenCL™ Applications
A nice way to debug OpenCL applications is using the API debugging capabilities of the OpenCL™ Code Builder plug-in for Microsoft Visual Studio* IDE.
To start debugging API calls of an OpenCL application, you need to configure the API debugger. To do so, simply
1. Start Visual Studio*.
2. Go to CODE BUILDER > OpenCL Debugger > Options > API Debugger.
3. And check Enable OpenCL API Debugger.
Then you can insert breakpoints in the application near different OpenCL API calls and start debugging in a common way – with F5.
The API Debugger provides multiple views of the API calls. To open the views of your interest, just go to CODE BUILDER > OpenCL Debugger.
Use the following link to parts of the OpenCL™ Code Builder User Manual for more information about each of the API Debugger views:
1. Trace View
2. Objects Tree View
3. Properties View
4. Command Queue View
5. Problems View
6. Image View
7. Data View
8. Memory Tracing
For the full list of Code Builder plug-in capabilities as well as instructions for using them, refer to theOpenCL Code Builder – User Manual.
Might also Be Useful
Consider the following documents and web articles to get started with the OpenCL™ Code builder:
For more such Android resources and tools from Intel, please visit the Intel® Developer Zone
Source: https://software.intel.com/en-us/articles/getting-started-with-opencl-code-builder