Results 1 to 4 of 4

Thread: Problem writing to 3d image object

  1. #1

    Problem writing to 3d image object

    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.

  2. #2
    Senior Member
    Join Date
    Oct 2012
    Posts
    103
    Are you sure that your device has support for the cl_khr_3d_image_writes extension?

    Also use clGetProgramBuildInfo() with CL_PROGRAM_BUILD_LOG to get more info about the reason why the build failed.

  3. #3
    No. I am not sure of that. I am using Intel Dual Core CPU as the device. How do I know that?

  4. #4
    Senior Member
    Join Date
    Oct 2012
    Posts
    103
    Check whether the extension is present in the string returned by clGetDeviceInfo() with CL_DEVICE_EXTENSIONS.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •