'\" t .\" Title: accessQualifiers .\" Author: The Khronos Group .\" Generator: DocBook XSL Stylesheets vsnapshot .\" Date: 01/14/2021 .\" Manual: OpenCL Manual .\" Source: The Khronos Group .\" Language: English .\" .TH "ACCESSQUALIFIERS" "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" Access_Qualifiers \- Access Qualifiers for image memory objects\&. .SS "" .TS tab(:); l. T{ __read_only __write_only read_only write_only T} .TE .sp 1 .SH "DESCRIPTION" .PP Image objects specified as arguments to a kernel can be declared to be read\-only or write\-only\&. A kernel cannot read from and write to the same image object\&. The \fB__read_only\fR (or \fBread_only\fR) and \fB__write_only\fR (or \fBwrite_only\fR) qualifiers must be used with image object arguments to declare if the image object is being read or written by a kernel\&. The default qualifier is \fB__read_only\fR\&. .SH "NOTES" .PP The \fB__read_only\fR, \fB__write_only\fR, \fB__read_write\fR, \fBread_only\fR, \fBwrite_only\fR and \fBread_write\fR names are reserved for use as access qualifiers and shall not be used otherwise\&. .SS "Example" .PP In the example below, \fBimageA\fR is a read\-only 2D image object, and \fBimageB\fR is a write\-only 2D image object\&. .TS tab(:); l. T{ __kernel void foo (read_only image2d_t imageA, write_only image2d_t imageB) { \&.\&.\&. } T} .TE .sp 1 .SH "SPECIFICATION" .PP \m[blue]\fBOpenCL Specification\fR\m[]\&\s-2\u[1]\d\s+2 .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 226, section 6.6 - Access Qualifiers .RE