I am getting an error of CL_INVALID_COMMAND_QUEUE while using barrier(CLK_LOCAL_MEM_FENCE ) in my code. When I don't use this the code runs successfully. But since this is not redundant I need to fix this.
Since its a large project I am confining the error to a small scale. My OpenCL kernel has been reduced to just a few lines of code. In that, if I use barrier I get this error.
So any clues on what is causing this error.
Thanks in advance