'\" t .\" Title: Image Read, Write, and Query Functions .\" Author: The Khronos Group .\" Generator: DocBook XSL Stylesheets vsnapshot .\" Date: 01/14/2021 .\" Manual: OpenCL Manual .\" Source: The Khronos Group .\" Language: English .\" .TH "IMAGE READ, WRITE, A" "3clc" "01/14/2021" "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" Image_Read_and_Write_Functions \- Built\-in functions to read, write, and query image memory objects\&. Click an item in the table below for details about that function\&. .SH "" .TS allbox tab(:); l l l l l l l l l l l l l l l l l l l l l l l l l l l l l l l l l l l l l l. T{ \fBread_imagef1d\fR(3clc) for 1D T}:T{ Do an element lookup in the 1D image object with or without a sampler, returning floating\-point values\&. T} T{ \fBread_imagei1d\fR(3clc) for 1D T}:T{ Do an element lookup in the 1D image object with or without a sampler, returning unnormalized signed integer and unsigned integer values\&. T} T{ \fBread_imageh1d\fR(3clc) for 1D T}:T{ OPTIONAL function to do an element lookup in the 1D image object with or without a sampler, returning floating\-point values\&. Enabled with \fBcl_khr_fp16\fR(3clc)\&. T} T{ \fBwrite_image1d\fR(3clc) for 1D T}:T{ Write \fIcolor\fR value to location in the 2D image object\&. The \fBhalf\fR type is enabled with \fBcl_khr_fp16\fR(3clc)\&. T} T{ \fBread_imagef2d\fR(3clc) for 2D T}:T{ Do an element lookup in the 2D image object with or without a sampler, returning floating\-point values\&. T} T{ \fBread_imagei2d\fR(3clc) for 2D T}:T{ Do an element lookup in the 2D image object with or without a sampler, returning unnormalized signed integer and unsigned integer values\&. T} T{ \fBread_imageh2d\fR(3clc) for 2D T}:T{ OPTIONAL function to do an element lookup in the 2D image object with or without a sampler, returning floating\-point values\&. Enabled with \fBcl_khr_fp16\fR(3clc)\&. T} T{ \fBwrite_image2d\fR(3clc) for 2D T}:T{ Write \fIcolor\fR value to location in the 2D image object\&. The \fBhalf\fR type is enabled with \fBcl_khr_fp16\fR(3clc)\&. T} T{ \fBread_imagef3d\fR(3clc) for 3D T}:T{ Do an element lookup in the 3D image object with or without a sampler, returning floating\-point values\&. T} T{ \fBread_imagei3d\fR(3clc) for 3D T}:T{ Do an element lookup in the 3D image object with or without a sampler, returning unnormalized signed integer and unsigned integer values\&. T} T{ \fBread_imageh3d\fR(3clc) for 3D T}:T{ OPTIONAL function to do an element lookup in the 3D image object with or without a sampler, returning floating\-point values\&. Enabled with \fBcl_khr_fp16\fR(3clc)\&. T} T{ \fBwrite_image3d\fR(3clc) for 3D T}:T{ Write \fIcolor\fR value to location in the 2D image object\&. The \fBhalf\fR type is enabled with \fBcl_khr_fp16\fR(3clc)\&. T} T{ \fBget_image_width\fR(3clc) T}:T{ Return the image width in pixels T} T{ \fBget_image_height\fR(3clc) T}:T{ Return the image height in pixels\&. T} T{ \fBget_image_depth\fR(3clc) T}:T{ Return the 3D image depth in pixels T} T{ \fBget_image_channel_data_type\fR(3clc) T}:T{ Return the image channel data type T} T{ \fBget_image_channel_order\fR(3clc) T}:T{ Return the image channel order T} T{ \fBget_image_dim\fR(3clc) T}:T{ Return the image dimensions T} T{ \fBget_image_array_size\fR(3clc) T}:T{ Return the number of images in an image array T} .TE .sp 1 .SH "NOTES" .PP 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\&. .PP Image memory objects that are being read by a kernel should be declared with the \fBaccessQualifiers\fR(3clc) qualifier\&. \fBwrite_image\fR calls to image memory objects declared with the \fBaccessQualifiers\fR(3clc) qualifier will generate a compilation error\&. Image memory objects that are being written to by a kernel should be declared with the \fBaccessQualifiers\fR(3clc) qualifier\&. \fBread_image\fR calls to image memory objects declared with the \fBaccessQualifiers\fR(3clc) qualifier will generate a compilation error\&. \fBread_image\fR and \fBwrite_image\fR calls to the same image memory object in a kernel are not supported\&. .PP The \fBread_image\fR calls returns a four component floating\-point, integer or unsigned integer color value\&. The color values returned by \fBread_image\fR 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\&. .SH "SPECIFICATION" .PP \m[blue]\fBOpenCL Specification\fR\m[]\&\s-2\u[1]\d\s+2 .SH "SEE ALSO" .PP \fBsampler_t\fR(3clc), \fBcl_khr_3d_image_writes\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