Skip to content

Commit d17a3f1

Browse files
authored
[SYCL][DOC] Fix syntax errors in auto_range spec (#11441)
Fix some syntax errors in the extension specification for `auto_range`. Since `auto_range` is a function, we need to add parens to call it. We also need braces around the integral `N` when it is used to construct an anonymous `range`.
1 parent 8e5275a commit d17a3f1

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

sycl/doc/extensions/experimental/sycl_ext_oneapi_auto_local_range.asciidoc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
== Notice
2121

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

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

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

0 commit comments

Comments
 (0)