imageFunctions(3clc)

imageFunctions3clc

Built-in functions to read, write, and query image memory objects. click an item in the table below for details about that function.

read_imagef1d(3clc) for 1DDo an element lookup in the 1D image object with or without a sampler, returning floating-point values.
read_imagei1d(3clc) for 1DDo an element lookup in the 1D image object with or without a sampler, returning unnormalized signed integer and unsigned integer values.
read_imageh1d(3clc) for 1DOPTIONAL function to do an element lookup in the 1D image object with or without a sampler, returning floating-point values. Enabled with cl_khr_fp16(3clc).
write_image1d(3clc) for 1DWrite color value to location in the 2D image object. The half type is enabled with cl_khr_fp16(3clc).
read_imagef2d(3clc) for 2DDo an element lookup in the 2D image object with or without a sampler, returning floating-point values.
read_imagei2d(3clc) for 2DDo an element lookup in the 2D image object with or without a sampler, returning unnormalized signed integer and unsigned integer values.
read_imageh2d(3clc) for 2DOPTIONAL function to do an element lookup in the 2D image object with or without a sampler, returning floating-point values. Enabled with cl_khr_fp16(3clc).
write_image2d(3clc) for 2DWrite color value to location in the 2D image object. The half type is enabled with cl_khr_fp16(3clc).
read_imagef3d(3clc) for 3DDo an element lookup in the 3D image object with or without a sampler, returning floating-point values.
read_imagei3d(3clc) for 3DDo an element lookup in the 3D image object with or without a sampler, returning unnormalized signed integer and unsigned integer values.
read_imageh3d(3clc) for 3DOPTIONAL function to do an element lookup in the 3D image object with or without a sampler, returning floating-point values. Enabled with cl_khr_fp16(3clc).
write_image3d(3clc) for 3DWrite color value to location in the 2D image object. The half type is enabled with cl_khr_fp16(3clc).
get_image_width(3clc)Return the image width in pixels
get_image_height(3clc)Return the image height in pixels.
get_image_depth(3clc)Return the 3D image depth in pixels
get_image_channel_data_type(3clc)Return the image channel data type
get_image_channel_order(3clc)Return the image channel order
get_image_dim(3clc)Return the image dimensions
get_image_array_size(3clc)Return the number of images in an image array

Notes

The built-in functions defined in this section can only be used with image memory objects. An image memory object can be accessed by specific function calls that read from and/or write to specific locations in the image.

Image memory objects that are being read by a kernel should be declared with the accessQualifiers(3clc) qualifier. write_image calls to image memory objects declared with the accessQualifiers(3clc) qualifier will generate a compilation error. Image memory objects that are being written to by a kernel should be declared with the accessQualifiers(3clc) qualifier. read_image calls to image memory objects declared with the accessQualifiers(3clc) qualifier will generate a compilation error. read_image and write_image calls to the same image memory object in a kernel are not supported.

The read_image calls returns a four component floating-point, integer or unsigned integer color value. The color values returned by read_image are identified as x, y, z, w where x refers to the red component, y refers to the green component, z refers to the blue component and w refers to the alpha component.

Specification

OpenCL Specification[1]

Notes

1.

OpenCL Specification

page 292, section 6.12.14 - Image Read and Write Functions

Releases

5 releases since Debian 8 (Jessie); the text changed 3 times.

  1. 8–9
  2. 10
  3. 11
  4. 13

Authors

The Khronos Group

From opencl-1.2-man-doc 1.0~svn33624-5.1 in Debian 13 (Trixie). Parsed by carta from the page's man source.