PDA

View Full Version : openCL barrier() is not recognized by VC++ 2010



a0074331
12-28-2012, 10:13 AM
my VC++ doesnt recognized barrier() function, as it gives error 'barrier': identifier not found. How can I fix that problem?

This was how I configureed VC++ to work with openCL: http://opencl.codeplex.com/wikipage?tit ... 0Tutorials (http://opencl.codeplex.com/wikipage?title=OpenCL%20Tutorials%20-%200&referringTitle=OpenCL%20Tutorials)

Dithermaster
12-28-2012, 03:26 PM
barrier() can only be used inside an OpenCL kernel, and not code that is compiled by Visual Studio.

Start with one of the example projects (available, for example, in one of the SDKs, like AMD's APP SDK). You'll see host-side code for finding and creating device contexts, and then they will pass the kernel source to be compiled and run on the GPU.