[PATCH] D60455: [SYCL] Add sycl_kernel attribute for accelerated code outlining
Mariya Podchishchaeva via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Dec 2 04:21:18 PST 2019
Fznamznon accepted this revision.
Fznamznon added a comment.
LGTM with a couple of minor comments.
================
Comment at: clang/include/clang/Basic/AttrDocs.td:273
+ cgh.parallel_for<init_a>(range<1>{1024}, [=](id<1> index) {
+ A[index] = index[0] * 2 + index[1] + foo(42);
+ });
----------------
Sorry for late catch, but there is a little bug in this SYCL code: `index` is one-dimensional `id`, so calling subscript operator with any value other than `0` is a bug.
================
Comment at: clang/include/clang/Basic/AttrDocs.td:319
+- The function must have at least one parameter. The first parameter is
+ required to be a function object type (named or unnamed i.e. lambda). The
+ compiler uses function object type fields to generate OpenCL kernel
----------------
There are two spaces between "." and "The" at the end of line 319.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D60455/new/
https://reviews.llvm.org/D60455
More information about the cfe-commits
mailing list