Skip to content

Commit

Permalink
Update 09-sycl-memory.md
Browse files Browse the repository at this point in the history
  • Loading branch information
csccva authored Nov 28, 2024
1 parent 6ab984d commit cae367d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions docs/09-sycl-memory.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,9 @@ lang: en
// Create buffers for data
buffer<int, 1> a_buf(y.data(), range<1>(N));
q.submit([&](handler& cgh) {
accessor a{a_buf, cgh, read_write};
accessor y_acc{a_buf, cgh, read_write};
cgh.parallel_for(range<1>(N), [=](id<1> id) {
y[id] +=1;
y_acc[id] +=1;
});
});
host_accessor result{a_buf}; // host can access data also directly after buffer destruction
Expand Down

0 comments on commit cae367d

Please sign in to comment.