Hello everyone,
I am using this sample kernel code to write to 3d image objects. However, there is error when I build the program using clBuildProgram(). The error code it returns is -11.

const char *source=
"#pragma OPENCL EXTENSION cl_khr_3d_image_writes : enable \n"
"__kernel void hello( write_only image3d_t out) \n"
"{ \n"
"int4 cd=(int4)(1,1,1,1); \n"
"uint4 c=(uint4)(1,2,3,4); \n"
"write_imageui( out, cd, c); \n"
"} \n";

Please tell me where am I going wrong. Thank You.