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.

Download:

  • 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)
About these ads
This entry was posted in OpenCL and tagged , . Bookmark the permalink.

6 条 Intel OpenCL Samples for Linux 的回复

  1. Andrey says:

    Hi!
    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 says:

      OK, I figured out, DevIL is a graphics library (http://openil.sourceforge.net). 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 http://my.arava.co.il/~matan/svgalib/hypermail/1999/0360.html). With a magic #pragma pack(1) (from http://cboard.cprogramming.com/linux-programming/63919-strange-problem-bmp.html) 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 says:

        Update: after editing of libOpenCL.so (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 :)

      • 鹏鹏 says:

        I agree with you. Now the OpenCL implementations are confused. Each implementation has its own libOpenCL.so. 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.

    • 鹏鹏 says:

      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 says:

        Hi…

        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 libOpenCL.so. Someone please help me for editing of libOpenCL.so (hex) code to change the /etc/OpenCL/vendors path?

发表评论

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

WordPress.com Logo

You are commenting using your WordPress.com 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 / 更改 )

Google+ photo

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

Connecting to %s