Chapter 1: An Introduction to OpenCL
Although this chapter at times seems like an extended sales pitch for parallel computation and OpenCL more specifically, it does a good job of mixing high-level concepts with low-level specifics. The highlight in this chapter is the introduction to the parallel programming paradigm, i.e. context-host-kernel as well as work-items/work-groups. As my prior experience has been in sequential (non-parallel) application and database development, these concepts (together) are somewhat unfamiliar and require attention. Initially they can be counter-intuitive, but once the main concepts of context and kernel are grasped, the model begins to take shape and is very straight-forward. I could publish my own primer but that would seem fruitless when there are plenty out there right now.
Chapter 1 is a primer but requires somewhat of a computer engineering background to follow. A less intensive primer is available here or here or here and a basic tutorial is here.
Despite using the “-lOpenCL” flag in the linker options under the “Linker Settings” tab for the OpenCL compiler settings in Code::Blocks, I still receive the following build errors:
obj\Debug\main.o||In function `main’:|
C:\Users\txt103120\Desktop\CodeBlocks\device_check\main.cpp|27|undefined reference to `clGetPlatformIDs@12’|
C:\Users\txt103120\Desktop\CodeBlocks\device_check\main.cpp|29|undefined reference to `clGetDeviceIDs@24’|
C:\Users\txt103120\Desktop\CodeBlocks\device_check\main.cpp|44|undefined reference to `clGetDeviceInfo@20’|
C:\Users\txt103120\Desktop\CodeBlocks\device_check\main.cpp|71|undefined reference to `clGetDeviceInfo@20’|
||=== Build finished: 4 errors, 0 warnings ===|
I found this post on StackOverflow that seems relevant:
Now, I need to determine the course of action to resolve this.