[PATCH] D101089: [OpenCL] Document legacy atomics with generic address space
Anastasia Stulova via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Apr 29 06:07:11 PDT 2021
This revision was automatically updated to reflect the committed changes.
Closed by commit rG8fb0d6df11e4: [OpenCL][Docs] Describe extension for legacy atomics with generic addr space. (authored by Anastasia).
Herald added a subscriber: ldrumm.
Herald added a project: clang.
Changed prior to commit:
https://reviews.llvm.org/D101089?vs=339711&id=341493#toc
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D101089/new/
https://reviews.llvm.org/D101089
Files:
clang/docs/LanguageExtensions.rst
Index: clang/docs/LanguageExtensions.rst
===================================================================
--- clang/docs/LanguageExtensions.rst
+++ clang/docs/LanguageExtensions.rst
@@ -1813,6 +1813,23 @@
#pragma OPENCL EXTENSION __cl_clang_variadic_functions : disable
void bar(int a, ...); // error - variadic prototype is not allowed
+Legacy 1.x atomics with generic address space
+---------------------------------------------
+
+Clang allows use of atomic functions from the OpenCL 1.x standards
+with the generic address space pointer in C++ for OpenCL mode.
+
+This is a non-portable feature and might not be supported by all
+targets.
+
+**Example of Use**:
+
+.. code-block:: c++
+
+ void foo(__generic volatile unsigned int* a) {
+ atomic_add(a, 1);
+ }
+
Builtin Functions
=================
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D101089.341493.patch
Type: text/x-patch
Size: 822 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20210429/0469cbfe/attachment.bin>
More information about the cfe-commits
mailing list