We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6ab984d commit cae367dCopy full SHA for cae367d
docs/09-sycl-memory.md
@@ -42,9 +42,9 @@ lang: en
42
// Create buffers for data
43
buffer<int, 1> a_buf(y.data(), range<1>(N));
44
q.submit([&](handler& cgh) {
45
- accessor a{a_buf, cgh, read_write};
+ accessor y_acc{a_buf, cgh, read_write};
46
cgh.parallel_for(range<1>(N), [=](id<1> id) {
47
- y[id] +=1;
+ y_acc[id] +=1;
48
});
49
50
host_accessor result{a_buf}; // host can access data also directly after buffer destruction
0 commit comments