Skip to content

Commit cae367d

Browse files
authored
Update 09-sycl-memory.md
1 parent 6ab984d commit cae367d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

docs/09-sycl-memory.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,9 +42,9 @@ lang: en
4242
// Create buffers for data
4343
buffer<int, 1> a_buf(y.data(), range<1>(N));
4444
q.submit([&](handler& cgh) {
45-
accessor a{a_buf, cgh, read_write};
45+
accessor y_acc{a_buf, cgh, read_write};
4646
cgh.parallel_for(range<1>(N), [=](id<1> id) {
47-
y[id] +=1;
47+
y_acc[id] +=1;
4848
});
4949
});
5050
host_accessor result{a_buf}; // host can access data also directly after buffer destruction

0 commit comments

Comments
 (0)