'\" t .\" Title: get_image_channel_data_type .\" Author: The Khronos Group .\" Generator: DocBook XSL Stylesheets v1.79.1 .\" Date: 02/03/2019 .\" Manual: OpenCL Manual .\" Source: The Khronos Group .\" Language: English .\" .TH "GET_IMAGE_CHANNEL_DA" "3clc" "02/03/2019" "The Khronos Group" "OpenCL Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .\" http://bugs.debian.org/507673 .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" ----------------------------------------------------------------- .\" * set default formatting .\" ----------------------------------------------------------------- .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) .ad l .\" ----------------------------------------------------------------- .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- .SH "NAME" get_image_channel_data_type \- Return the channel data type\&. .SH "" .HP \w'int\ get_image_channel_data_type('u .BI "int get_image_channel_data_type(image1d_t\ " "image" ");" .HP \w'int\ get_image_channel_data_type('u .BI "int get_image_channel_data_type(image1d_buffer_t\ " "image" ");" .HP \w'int\ get_image_channel_data_type('u .BI "int get_image_channel_data_type(image2d_t\ " "image" ");" .HP \w'int\ get_image_channel_data_type('u .BI "int get_image_channel_data_type(image3d_t\ " "image" ");" .HP \w'int\ get_image_channel_data_type('u .BI "int get_image_channel_data_type(image1d_array_t\ " "image" ");" .HP \w'int\ get_image_channel_data_type('u .BI "int get_image_channel_data_type(image2d_array_t\ " "image" ");" .SH "DESCRIPTION" .PP Return the channel data type\&. Valid values are: .sp .if n \{\ .RS 4 .\} .nf 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 .fi .if n \{\ .RE .\} .sp .SH "NOTES" .PP The values returned by \fBget_image_channel_order\fR as shown above with the \fBCLK_\fR prefixes correspond to the \fBCL_\fR prefixes used to describe the image channel order and data type in the table of supported names and values in \fBclCreateSubBuffer\fR(3clc) and list of supported Image Channel Order Values for \fBclCreateImage\fR(3clc)\&. For example, both \fBCL_UNORM_INT8\fR and \fBCLK_UNORM_INT8\fR refer to an image channel data type that is an unnormalized unsigned 8\-bit integer\&. .PP 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 \fBread_image{f|i|ui}\fR or supplied to \fBwrite_image{f|i|ui}\fR\&. The unmapped components will be set to \fB0\&.0\fR for red, green and blue channels and will be set to \fB1\&.0\fR for the alpha channel\&. .PP .TS allbox center tab(:); cB cB. T{ Channel Order T}:T{ \fBfloat4\fR, \fBint4\fR or \fBunsigned int4\fR components of channel data T} .T& c c c c c c c c c c c c c c c c. T{ \fBCL_R\fR, \fBCL_Rx\fR T}:T{ \fB(r, 0\&.0, 0\&.0, 1\&.0)\fR T} T{ \fBCL_A\fR T}:T{ \fB(0\&.0, 0\&.0, 0\&.0, a)\fR T} T{ \fBCL_RG\fR, \fBCL_RGx\fR T}:T{ \fB(r, g, 0\&.0, 1\&.0)\fR T} T{ \fBCL_RA\fR T}:T{ \fB(r, 0\&.0, 0\&.0, a)\fR T} T{ \fBCL_RGB\fR, \fBCL_RGBx\fR T}:T{ \fB(r, g, b, 1\&.0)\fR T} T{ \fBCL_RGBA, CL_BGRA, CL_ARGB\fR T}:T{ \fB(r, g, b, a)\fR T} T{ \fBCL_INTENSITY\fR T}:T{ \fB(I, I, I, I)\fR T} T{ \fBCL_LUMINANCE\fR T}:T{ \fB(L, L, L, 1\&.0)\fR T} .TE .sp 1 .PP A kernel that uses a sampler with the \fBCL_ADDRESS_CLAMP\fR addressing mode with multiple images may result in additional samplers being used internally by an implementation\&. If the same sampler is used with multiple images called via \fBread_imagef2d\fR(3clc), then it is possible that an implementation may need to allocate an additional sampler to handle the different border color values that may be needed depending on the image formats being used\&. These implementation allocated samplers will count against the maximum sampler values supported by the device and given by \fBCL_DEVICE_MAX_SAMPLERS\fR\&. Enqueuing a kernel that requires more samplers than the implementation can support will result in a \fBCL_OUT_OF_RESOURCES\fR error being returned\&. .SH "SPECIFICATION" .PP \m[blue]\fBOpenCL Specification\fR\m[]\&\s-2\u[1]\d\s+2 .SH "SEE ALSO" .PP \fBimageFunctions\fR(3clc) .SH "AUTHORS" .PP \fBThe Khronos Group\fR .SH "COPYRIGHT" .br Copyright \(co 2007-2011 The Khronos Group Inc. .br Permission is hereby granted, free of charge, to any person obtaining a copy of this software and/or associated documentation files (the "Materials"), to deal in the Materials without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Materials, and to permit persons to whom the Materials are furnished to do so, subject to the condition that this copyright notice and permission notice shall be included in all copies or substantial portions of the Materials. .sp .SH "NOTES" .IP " 1." 4 OpenCL Specification .RS 4 \%page 292, section 6.12.14 - Image Read and Write Functions .RE