---
name: "accessQualifiers"
section: "3clc"
platform: "linux"
package: "opencl-1.2-man-doc"
version: "1.0~svn33624-5.1"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/accessQualifiers"
---

# accessQualifiers(3clc)

Access Qualifiers for image memory objects.

## NAME

Access\_Qualifiers - Access Qualifiers for image memory objects.

###

| |
| --- |
| \_\_read\_only \_\_write\_only read\_only write\_only |

## DESCRIPTION

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 **\_\_read\_only** (or **read\_only**) and **\_\_write\_only** (or **write\_only**) 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 **\_\_read\_only**.

## NOTES

The **\_\_read\_only**, **\_\_write\_only**, **\_\_read\_write**, **read\_only**, **write\_only** and **read\_write** names are reserved for use as access qualifiers and shall not be used otherwise.

### Example

In the example below, **imageA** is a read-only 2D image object, and **imageB** is a write-only 2D image object.

| |
| --- |
| \_\_kernel void foo (read\_only image2d\_t imageA, write\_only image2d\_t imageB) { ... } |

## SPECIFICATION

**OpenCL Specification**\[1\]

## AUTHORS

**The Khronos Group**

## COPYRIGHT

Copyright © 2007-2011 The Khronos Group Inc.\
 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.

## NOTES

- 1\.

  OpenCL Specification

  page 226, section 6.6 - Access Qualifiers
