Skip to content

Commit f23ee23

Browse files
authored
Merge pull request #1751 from hdelan/deprecated-header
[NFC] Use sycl/sycl.hpp instead of CL/sycl.hpp
2 parents de17134 + 7f25504 commit f23ee23

File tree

2 files changed

+15
-16
lines changed

2 files changed

+15
-16
lines changed

test/conformance/device_code/cpy_and_mult.cpp

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,24 +3,24 @@
33
// See LICENSE.TXT
44
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
55

6-
#include <CL/sycl.hpp>
6+
#include <sycl/sycl.hpp>
77

88
int main() {
99
size_t array_size = 16;
10-
cl::sycl::queue sycl_queue;
10+
sycl::queue sycl_queue;
1111
std::vector<uint32_t> src(array_size, 1);
1212
std::vector<uint32_t> dst(array_size, 1);
1313
auto src_buff =
14-
cl::sycl::buffer<uint32_t>(src.data(), cl::sycl::range<1>(array_size));
14+
sycl::buffer<uint32_t>(src.data(), sycl::range<1>(array_size));
1515
auto dst_buff =
16-
cl::sycl::buffer<uint32_t>(dst.data(), cl::sycl::range<1>(array_size));
16+
sycl::buffer<uint32_t>(dst.data(), sycl::range<1>(array_size));
1717

18-
sycl_queue.submit([&](cl::sycl::handler &cgh) {
19-
auto src_acc = src_buff.get_access<cl::sycl::access::mode::read>(cgh);
20-
auto dst_acc = dst_buff.get_access<cl::sycl::access::mode::write>(cgh);
18+
sycl_queue.submit([&](sycl::handler &cgh) {
19+
auto src_acc = src_buff.get_access<sycl::access::mode::read>(cgh);
20+
auto dst_acc = dst_buff.get_access<sycl::access::mode::write>(cgh);
2121
cgh.parallel_for<class cpy_and_mult>(
22-
cl::sycl::range<1>{array_size},
23-
[src_acc, dst_acc](cl::sycl::item<1> itemId) {
22+
sycl::range<1>{array_size},
23+
[src_acc, dst_acc](sycl::item<1> itemId) {
2424
auto id = itemId.get_id(0);
2525
dst_acc[id] = src_acc[id] * 2;
2626
});

test/conformance/device_code/cpy_and_mult_usm.cpp

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,17 +3,16 @@
33
// See LICENSE.TXT
44
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
55

6-
#include <CL/sycl.hpp>
6+
#include <sycl/sycl.hpp>
77

88
int main() {
99
size_t array_size = 16;
10-
cl::sycl::queue sycl_queue;
11-
uint32_t *src = cl::sycl::malloc_device<uint32_t>(array_size, sycl_queue);
12-
uint32_t *dst = cl::sycl::malloc_device<uint32_t>(array_size, sycl_queue);
13-
sycl_queue.submit([&](cl::sycl::handler &cgh) {
10+
sycl::queue sycl_queue;
11+
uint32_t *src = sycl::malloc_device<uint32_t>(array_size, sycl_queue);
12+
uint32_t *dst = sycl::malloc_device<uint32_t>(array_size, sycl_queue);
13+
sycl_queue.submit([&](sycl::handler &cgh) {
1414
cgh.parallel_for<class cpy_and_mult_usm>(
15-
cl::sycl::range<1>{array_size},
16-
[src, dst](cl::sycl::item<1> itemId) {
15+
sycl::range<1>{array_size}, [src, dst](sycl::item<1> itemId) {
1716
auto id = itemId.get_id(0);
1817
dst[id] = src[id] * 2;
1918
});

0 commit comments

Comments
 (0)