Intel OpenCL Samples for Linux

The gold release of Intel OpenCL SDK has been available. They have made a solid implementation and provided great developer support on the forum. Although it supports Linux excellently, the samples and offline compiler are only available on Windows. As an Linux user, I migrated the samples to Linux except the ShallowWater which needs Direct3D.

  1. Pre-requirement: Intel OpenCL SDK for Linux, DevIL.
  2. Development environment: Eclipse for C++ and GCC.


  • Full Version (40.8M)
  • No Data Version (2.1M, no data files for GodRays and ToneMapping which can be extracted from Intel OpenCL SDK for windows)
此条目发表在OpenCL分类目录,贴了, 标签。将固定链接加入收藏夹。

6 Responses to Intel OpenCL Samples for Linux

  1. Andrey说道:

    Thanks for porting!
    For the first I tried to compile the MedianFilter.cpp, but it failed, because if missing utils.h. It seems to be missing in linux-samples. Could you also put the directory IntelOpenCLCommon in your archives? And what does DevIL stay for (it is very hard to google on this word)?

    P.S. I’m working with the minimal environment: not using Eclipse, OpenCL SDK is just unpacked to custom path and I’ve written custom Makefile.

    • Andrey说道:

      OK, I figured out, DevIL is a graphics library ( Than I’ve extracted files from windows sdk (exe->msi->cab) using 7z and cabextract and found FILE_359 and FILE_360 are utils.cpp and utils.h. I’ve tried WIN32->linux defines (from With a magic #pragma pack(1) (from it did work!
      Because my intel notebook is still under debian-i386 I’ve successfully tried the example with AMD SDK. But vice versa: running intel OpenCL on AMD64-CPU didn’t work 😦
      Maybe Intel want to make also 32bit version available and the main thing: shouldn’t block the amd64-cpu as supported platform (calling clGetPlatformIDs())?..

      • Andrey说道:

        Update: after editing of (hex) and intelocl64.icd it did work on amd64-cpu. I hope Intel could:
        1) code the access to /etc/OpenCL/vendors through the environment variable OPENCL_VENDOR_PATH (of course with fallback to the standard path) and
        2) specify no hard-coded path in intelocl64.icd. LD_LIBRARY_PATH is for that.
        After that one could use intel opencl library as easy as the one from AMD 🙂

      • 鹏鹏说道:

        I agree with you. Now the OpenCL implementations are confused. Each implementation has its own So If I want to use both Intel SDK and Nvidia SDK, I have to intall them separately. I hope the Khronos could provide some mechanisms to clear them in the next specification.

    • 鹏鹏说道:

      Hi! Thanks for your remark.
      If I have made no mistake, the utils.h should be included under the folder /intel-opencl-samples/IntelOpenCLCommon.
      I am not a senior Linux developer. So from the beginning I have been using Eclipse and not familiar with makefile syntax.
      Maybe you can try Eclipse. It is very easy and convenient to develop c++ project. If Intel don’t want to release Linux version of samples in the future, I will try to learn makefile and build a real open source project.

      • Nisha说道:


        I really need to say thanks for writing this blog. This helped me to learn so many things . I am using Intel OpenCL sdk , I wants to change the default icd file PATH which is hardcoded in Someone please help me for editing of (hex) code to change the /etc/OpenCL/vendors path?


Fill in your details below or click an icon to log in: 徽标

You are commenting using your account. Log Out /  更改 )

Google+ photo

You are commenting using your Google+ account. Log Out /  更改 )

Twitter picture

You are commenting using your Twitter account. Log Out /  更改 )

Facebook photo

You are commenting using your Facebook account. Log Out /  更改 )

Connecting to %s