Description
The following built-in function calls to query image information are supported.
aQual in the following table refers to one of the access qualifiers.
For query functions this may be read_only, write_only or read_write.
| Function | Description |
|---|---|
int get_image_width(aQual image2d_t image) For OpenCL C 1.2 or newer: int get_image_width(aQual image1d_t image) For OpenCL C 2.0 or newer, or if the int get_image_width(aQual image2d_depth_t image) If the int get_image_width(aQual image2d_msaa_t image) |
Return the image width in pixels. |
int get_image_height(aQual image2d_t image) For OpenCL C 1.2 or newer: int get_image_height(aQual image2d_array_t image) For OpenCL C 2.0 or newer, or if the int get_image_height(aQual image2d_depth_t image) If the int get_image_height(aQual image2d_msaa_t image) |
Return the image height in pixels. |
int get_image_depth(image3d_t image) |
Return the image depth in pixels. |
int get_image_channel_data_type(aQual image2d_t image) For OpenCL C 1.2 or newer: int get_image_channel_data_type(aQual image1d_t image) For OpenCL C 2.0 or newer, or if the int get_image_channel_data_type(aQual image2d_depth_t image) If the int get_image_channel_data_type(aQual image2d_msaa_t image) |
Return the channel data type. Valid values are: Additionally, for OpenCL C 3.0 or newer: Additionally, if the Additionally, if the |
int get_image_channel_order(aQual image2d_t image) For OpenCL C 1.2 or newer: int get_image_channel_order(aQual image1d_t image) For OpenCL C 2.0 or newer, or if the int get_image_channel_order(aQual image2d_depth_t image) If the int get_image_channel_order(aQual image2d_msaa_t image) |
Return the image channel order. Valid values are: Additionally, for OpenCL C 1.1 or newer: Additionally, for OpenCL C 2.0 or newer: |
int2 get_image_dim(aQual image2d_t image) For OpenCL C 1.2 or newer: int2 get_image_dim(aQual image2d_array_t image) For OpenCL C 2.0 or newer, or if the int2 get_image_dim(aQual image2d_depth_t image) If the int2 get_image_dim(aQual image2d_msaa_t image) |
Return the 2D image width and height as an |
int4 get_image_dim(aQual image3d_t image) |
Return the 3D image width, height, and depth as an |
For OpenCL C 1.2 or newer: size_t get_image_array_size(aQual image2d_array_t image) For OpenCL C 2.0 or newer, or if the size_t get_image_array_size(aQual image2d_array_depth_t image) If the size_t get_image_array_size(aQual image2d_array_msaa_depth_t image) |
Return the number of images in the 2D image array. |
For OpenCL C 1.2 or newer: size_t get_image_array_size(aQual image1d_array_t image) |
Return the number of images in the 1D image array. |
If the int get_image_num_samples(aQual image2d_msaa_t image) |
Return the number of samples in the 2D MSAA image |
If the int get_image_num_mip_levels(aQual image1d_t image) |
Return the number of mip levels in image. |
The values returned by get_image_channel_data_type and
get_image_channel_order as specified in Built-in Image
Query Functions with the CLK_ prefixes correspond to the CL_ prefixes used
to describe the image channel order and
data type in the OpenCL
Specification.
For example, both CL_UNORM_ and CLK_UNORM_INT8 refer to an image
channel data type that is an unnormalized unsigned 8-bit integer.
Document Notes
For more information, see the OpenCL C Specification
This page is extracted from the OpenCL C Specification. Fixes and changes should be made to the Specification, not directly.