'\" t .\" Title: imageDescriptor .\" 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 "IMAGEDESCRIPTOR" "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" imageDescriptor \- The image descriptor structure describes the type and dimensions of the image or image array and is defined as: .SS "" .TS tab(:); l. T{ typedef struct _cl_image_desc { cl_mem_object_type image_type; size_t image_width; size_t image_height; size_t image_depth; size_t image_array_size; size_t image_row_pitch; size_t image_slice_pitch; cl_uint num_mip_levels; cl_uint num_samples; cl_mem buffer; } cl_image_desc; T} .TE .sp 1 .SH "MEMBERS" .PP image_type .RS 4 Describes the image type and must be either \fBCL_MEM_OBJECT_IMAGE1D\fR, \fBCL_MEM_OBJECT_IMAGE1D_BUFFER\fR, \fBCL_MEM_OBJECT_IMAGE1D_ARRAY\fR, \fBCL_MEM_OBJECT_IMAGE2D\fR, \fBCL_MEM_OBJECT_IMAGE2D_ARRAY\fR, or \fBCL_MEM_OBJECT_IMAGE3D\fR\&. .RE .PP image_width .RS 4 The width of the image in pixels\&. For a 2D image and image array, the image width must be ≤ \fBCL_DEVICE_IMAGE2D_MAX_WIDTH\fR\&. For a 3D image, the image width must be ≤ \fBCL_DEVICE_IMAGE3D_MAX_WIDTH\fR\&. For a 1D image buffer, the image width must be ≤ \fBCL_DEVICE_IMAGE_MAX_BUFFER_SIZE\fR\&. For a 1D image and 1D image array, the image width must be ≤ \fBCL_DEVICE_IMAGE2D_MAX_WIDTH\fR\&. .RE .PP image_height .RS 4 The height of the image in pixels\&. This is only used if the image is a 2D, 3D or 2D image array\&. For a 2D image or image array, the image height must be ≤ \fBCL_DEVICE_IMAGE2D_MAX_HEIGHT\fR\&. For a 3D image, the image height must be ≤ \fBCL_DEVICE_IMAGE3D_MAX_HEIGHT\fR\&. .RE .PP image_depth .RS 4 The depth of the image in pixels\&. This is only used if the image is a 3D image and must be a value ≥ 1 and ≤ \fBCL_DEVICE_IMAGE3D_MAX_DEPTH\fR\&. .RE .PP image_array_size .RS 4 The number of images in the image array\&. This is only used if the image is a 1D or 2D image array\&. The values for \fIimage_array_size\fR, if specified, must be a value ≥ 1 and ≤ \fBCL_DEVICE_IMAGE_MAX_ARRAY_SIZE\fR\&. .sp Note that reading and writing 2D image arrays from a kernel with \fIimage_array_size\fR = 1 may be lower performance than 2D images\&. .RE .PP image_row_pitch .RS 4 The scan\-line pitch in bytes\&. This must be 0 if \fIhost_ptr\fR is NULL and can be either 0 or ≥ image_width * size of element in bytes if \fIhost_ptr\fR is not NULL\&. If \fIhost_ptr\fR is not NULL and \fIimage_row_pitch\fR = 0, \fIimage_row_pitch\fR is calculated as \fIimage_width\fR * size of element in bytes\&. If \fIimage_row_pitch\fR is not 0, it must be a multiple of the image element size in bytes\&. .RE .PP image_slice_pitch .RS 4 The size in bytes of each 2D slice in the 3D image or the size in bytes of each image in a 1D or 2D image array\&. This must be 0 if \fIhost_ptr\fR is NULL\&. If \fIhost_ptr\fR is not NULL, \fIimage_slice_pitch\fR can be either 0 or ≥ \fIimage_row_pitch\fR * \fIimage_height\fR for a 2D image array or 3D image and can be either 0 or ≥ \fIimage_row_pitch\fR for a 1D image array\&. If \fIhost_ptr\fR is not NULL and \fIimage_slice_pitch\fR = 0, \fIimage_slice_pitch\fR is calculated as \fIimage_row_pitch\fR * \fIimage_height\fR for a 2D image array or 3D image and \fIimage_row_pitch\fR for a 1D image array\&. If \fIimage_slice_pitch\fR is not 0, it must be a multiple of the \fIimage_row_pitch\fR\&. .RE .PP num_mip_level, num_samples .RS 4 , Must be 0\&. .RE .PP buffer .RS 4 Refers to a valid buffer memory object if \fIimage_type\fR is \fBCL_MEM_OBJECT_IMAGE1D_BUFFER\fR\&. Otherwise it must be NULL\&. For a 1D image buffer object, the image pixels are taken from the buffer object\*(Aqs data store\&. When the contents of a buffer object\*(Aqs data store are modified, those changes are reflected in the contents of the 1D image buffer object and vice\-versa at corresponding sychronization points\&. The \fIimage_width\fR * size of element in bytes must be ≤ size of buffer object data store\&. .RE .SH "NOTE" .PP Concurrent reading from, writing to and copying between both a buffer object and 1D image buffer object associated with the buffer object is undefined\&. Only reading from both a buffer object and 1D image buffer object associated with the buffer object is defined\&. .SH "SPECIFICATION" .PP \m[blue]\fBOpenCL Specification\fR\m[]\&\s-2\u[1]\d\s+2 .SH "SEE ALSO" .PP \fBcl_image_format\fR(3clc) .SH "AUTHORS" .PP \fBThe Khronos Group\fR .SH "COPYRIGHT" .br Copyright \(co 2007-2010 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 95, section 5.3.1.2 - Image Descriptor .RE