Skip to content

[SYCL][Doc] Fix syntax errors in documentation #14937

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 8, 2024
Merged
Show file tree
Hide file tree
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 @@ -705,12 +705,12 @@ static constexpr size_t WGSIZE = 16;
SYCL_EXT_ONEAPI_FUNCTION_PROPERTY((syclexp::nd_range_kernel<1>))
void iota(float start, float *ptr) {
// Get the ID of this kernel iteration.
size_t id = syclext::this_work_item::get_nd_item().get_global_linear_id();
size_t id = syclext::this_work_item::get_nd_item<1>().get_global_linear_id();

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

void main() {
int main() {
sycl::queue q;
sycl::context ctxt = q.get_context();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -457,7 +457,7 @@ constexpr size_t WGSIZE = 256;

SYCL_EXT_ONEAPI_FUNCTION_PROPERTY((syclexp::nd_range_kernel<1>))
void mykernel(syclexp::work_group_memory<int[WGSIZE]> mem) {
size_t id = syclext::this_work_item::get_nd_item().get_local_linear_id();
size_t id = syclext::this_work_item::get_nd_item<1>().get_local_linear_id();

// Each work-item has its own dedicated element of the device local memory
// array.
Expand Down