Skip to content

[SYCL][DOC] Fix syntax errors in auto_range spec #11441

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Oct 16, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
== Notice

[%hardbreaks]
Copyright (C) 2022-2022 Intel Corporation. All rights reserved.
Copyright (C) 2022-2023 Intel Corporation. All rights reserved.

Khronos(R) is a registered trademark and SYCL(TM) and SPIR(TM) are trademarks
of The Khronos Group Inc. OpenCL(TM) is a trademark of Apple Inc. used by
Expand Down Expand Up @@ -78,7 +78,7 @@ if (N % multiple == 0) {
else {
local = /* find largest work-group size smaller than max that divides N */;
}
q.parallel_for<class KernelName>(sycl::nd_range<1>{N, local}, [=](sycl::nd_item<1>) {
q.parallel_for<class KernelName>(sycl::nd_range<1>{{N}, local}, [=](sycl::nd_item<1>) {
/* kernel body */
});
----
Expand All @@ -91,7 +91,7 @@ example simplifies to:

[source, c++]
----
q.parallel_for(sycl::nd_range<1>{N, sycl::ext::oneapi::experimental::auto_range<1>}, [=](sycl::nd_item<1>) {
q.parallel_for(sycl::nd_range<1>{{N}, sycl::ext::oneapi::experimental::auto_range<1>()}, [=](sycl::nd_item<1>) {
/* kernel body */
});
----
Expand Down