So far, I was using an image2d to store a 1D look-up table. I’ve logically decided to put it into an image1d. However, my kernel cannot be build (CL_BUILD_PROGRAM_FAILURE). The following code works for an image2d :
write_imagef(myImage, (int2)(col,0), (float4)(value));
And this one, which is essentially the same, doesn’t work for an image1d :
write_imagef(myImage, col, (float4)(value));
In the first case (1D), myImage was defined as “__write_only image2d_t myImage” and in the second one (2D) “__write_only image1d_t myImage”.