Results 1 to 3 of 3

Thread: write_imagef and image1d

  1. #1

    write_imagef and image1d


    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 :
    Code :
    write_imagef(myImage, (int2)(col,0), (float4)(value));
    And this one, which is essentially the same, doesn't work for an image1d :
    Code :
    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".

    Any help?


  2. #2

    Re: write_imagef and image1d

    I don't know why it isn't working, but when you get build failures you should definitely look at the build log to see what the compiler is telling you. There are also command-line tools for this (e.g. onlineclc, clcc) which I often find to be more convenient.

  3. #3
    Senior Member
    Join Date
    Oct 2012

    Re: write_imagef and image1d

    image1d is an OpenCL 1.2 feature. Are you sure your device supports OpenCL 1.2?

Similar Threads

  1. Confusion with write_imagef()
    By giridhart in forum OpenCL
    Replies: 1
    Last Post: 09-08-2010, 01:19 PM
  2. Replies: 0
    Last Post: 06-28-2010, 09:18 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
Proudly hosted by Digital Ocean