Skip to content

Commit 2b4cb11

Browse files
authored
[SYCL][Doc] Fix syntax errors in documentation (#14937)
Fix a couple syntax errors in the examples of some extension specifications.
1 parent 7f1ab96 commit 2b4cb11

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

sycl/doc/extensions/proposed/sycl_ext_oneapi_free_function_kernels.asciidoc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -705,12 +705,12 @@ static constexpr size_t WGSIZE = 16;
705705
SYCL_EXT_ONEAPI_FUNCTION_PROPERTY((syclexp::nd_range_kernel<1>))
706706
void iota(float start, float *ptr) {
707707
// Get the ID of this kernel iteration.
708-
size_t id = syclext::this_work_item::get_nd_item().get_global_linear_id();
708+
size_t id = syclext::this_work_item::get_nd_item<1>().get_global_linear_id();
709709

710710
ptr[id] = start + static_cast<float>(id);
711711
}
712712

713-
void main() {
713+
int main() {
714714
sycl::queue q;
715715
sycl::context ctxt = q.get_context();
716716

sycl/doc/extensions/proposed/sycl_ext_oneapi_work_group_memory.asciidoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -457,7 +457,7 @@ constexpr size_t WGSIZE = 256;
457457
458458
SYCL_EXT_ONEAPI_FUNCTION_PROPERTY((syclexp::nd_range_kernel<1>))
459459
void mykernel(syclexp::work_group_memory<int[WGSIZE]> mem) {
460-
size_t id = syclext::this_work_item::get_nd_item().get_local_linear_id();
460+
size_t id = syclext::this_work_item::get_nd_item<1>().get_local_linear_id();
461461
462462
// Each work-item has its own dedicated element of the device local memory
463463
// array.

0 commit comments

Comments
 (0)