[PATCH] D64418: [Docs][OpenCL] Documentation of C++ for OpenCL mode
Marco Antognini via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Jul 17 02:26:27 PDT 2019
mantognini accepted this revision.
mantognini added a comment.
This revision is now accepted and ready to land.
Beside my two comments, I think this looks good.
================
Comment at: docs/LanguageExtensions.rst:1614
+
+By default references will refer to ``__generic`` address space objects (except for
+dependent types that are not template specializations
----------------
` (` -> `, ` (there's no matching closing parenthesis.)
================
Comment at: docs/LanguageExtensions.rst:1652-1657
+ __kernel void bar() {
+ __local C c1; // will resolve to the first foo
+ C c2; // will resolve to the second foo
+ __constant C c3; // error due to mismatching address spaces - can't convert to
+ // __local or __generic
+ }
----------------
`foo()` isn't actually called here. You probably meant to write this:
```
__local C c1;
C c2;
__constant C c3;
c1.foo(); // will resolve to the first foo
c2.foo(); // will resolve to the second foo
c3.foo(); // error due to mismatching address spaces - can't convert to __local or __generic
```
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D64418/new/
https://reviews.llvm.org/D64418
More information about the cfe-commits
mailing list