Results 1 to 2 of 2

Thread: Confusion with write_imagef()

  1. #1
    Junior Member
    Join Date
    Nov 2007

    Confusion with write_imagef()

    CL spec specifies that the color values for different types of channel orders as below.
    CL_R, CL_Rx (r, 0.0, 0.0, 1.0)
    CL_A (0.0, 0.0, 0.0, a)
    CL_RG, CL_RGx (r, g, 0.0, 1.0)
    CL_RA (r, 0.0, 0.0, a)
    CL_RGB, CL_RGBx (r, g, b, 1.0)
    CL_RGBA, CL_BGRA, CL_ARGB (r, g, b, a)
    CL_LUMINANCE (L, L, L, 1.0)

    In case of write_image(f|i|ui) functions what would happen is the pixel values are not exactly in the format as shown above?
    for pixel value of
    CL_INTENSITY (a, b, c, d)
    CL_R, CL_Rx (r, a, b, 1.0)

    Should the spec specify any conversion rule for this kind of values or its users responsibility to use correct color value?

    thank you.

  2. #2
    Senior Member
    Join Date
    May 2010
    Toronto, Canada

    Re: Confusion with write_imagef()

    Search the spec for the following sentence:

    The following table describes the mapping of the number of channels of an image element to the appropriate components in the float4, int4 or uint4 vector data type for the color values returned by read_image{f|i|ui} or supplied to write_image{f|i|ui}. The unmapped components will be set to 0.0 for red, green and blue channels and will be set to 1.0 for the alpha channel.
    It's on page 242 of OpenCL 1.1 revision 33.
    Disclaimer: Employee of Qualcomm Canada. Any opinions expressed here are personal and do not necessarily reflect the views of my employer. LinkedIn profile.

Similar Threads

  1. write_imagef and image1d
    By vincentfpgarcia in forum OpenCL - parallel programming of heterogeneous systems
    Replies: 2
    Last Post: 03-14-2013, 06:13 AM
  2. OpenCL 1.0 - Any vendors support 3D write_imagef?
    By AlexAtOSU in forum OpenCL - parallel programming of heterogeneous systems
    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