table of contents
GET_IMAGE_CHANNEL_DA(3clc) | OpenCL Manual | GET_IMAGE_CHANNEL_DA(3clc) |
NAME¶
get_image_channel_data_type - Return the channel data type.¶
int
get_image_channel_data_type(image1d_t image);
int
get_image_channel_data_type(image1d_buffer_t image);
int
get_image_channel_data_type(image2d_t image);
int
get_image_channel_data_type(image3d_t image);
int
get_image_channel_data_type(image1d_array_t image);
int
get_image_channel_data_type(image2d_array_t image);
DESCRIPTION¶
Return the channel data type. Valid values are:CLK_SNORM_INT8 CLK_SNORM_INT16 CLK_UNORM_INT8 CLK_UNORM_INT16 CLK_UNORM_SHORT_565 CLK_UNORM_SHORT_555 CLK_UNORM_SHORT_101010 CLK_SIGNED_INT8 CLK_SIGNED_INT16 CLK_SIGNED_INT32 CLK_UNSIGNED_INT8 CLK_UNSIGNED_INT16 CLK_UNSIGNED_INT32 CLK_HALF_FLOAT CLK_FLOAT
NOTES¶
The values returned by get_image_channel_order as shown above with the CLK_ prefixes correspond to the CL_ prefixes used to describe the image channel order and data type in the table of supported names and values in clCreateSubBuffer(3clc) and list of supported Image Channel Order Values for clCreateImage(3clc). For example, both CL_UNORM_INT8 and CLK_UNORM_INT8 refer to an image channel data type that is an unnormalized unsigned 8-bit integer. 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.Channel Order | float4, int4 or unsigned int4 components of channel data |
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_INTENSITY | (I, I, I, I) |
CL_LUMINANCE | (L, L, L, 1.0) |
SPECIFICATION¶
OpenCL Specification[1]SEE ALSO¶
imageFunctions(3clc)AUTHORS¶
The Khronos GroupCOPYRIGHT¶
Copyright © 2007-2011 The Khronos Group Inc.NOTES¶
- 1.
- OpenCL Specification
page 292, section 6.12.14 - Image Read and Write
Functions
06/18/2014 | The Khronos Group |