Skip to content

Commit 00bf14f

Browse files
committed
more review comments
Signed-off-by: kbobrovs <[email protected]>
1 parent 5f0e1d0 commit 00bf14f

File tree

1 file changed

+12
-15
lines changed

1 file changed

+12
-15
lines changed

sycl/test/esimd/simd_copy_to_copy_from.cpp

Lines changed: 12 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -13,24 +13,19 @@
1313
using namespace sycl::INTEL::gpu;
1414
using namespace cl::sycl;
1515

16-
#ifdef __SYCL_DEVICE_ONLY__
17-
#define __SYCL_DEVICE_ATTR __attribute__((sycl_device))
18-
#else
19-
#define __SYCL_DEVICE_ATTR
20-
#endif // __SYCL_DEVICE_ONLY__
21-
2216
// --- Postive tests.
2317

24-
void kernel1(accessor<int, 1, access::mode::read_write,
25-
access::target::global_buffer> &buf) __SYCL_DEVICE_ATTR {
18+
SYCL_EXTERNAL void kernel1(
19+
accessor<int, 1, access::mode::read_write, access::target::global_buffer>
20+
&buf) SYCL_ESIMD_FUNCTION {
2621
simd<int, 32> v1(0, 1);
2722
simd<int, 32> v0;
2823
v0.copy_from(buf, 0);
2924
v0 = v0 + v1;
3025
v0.copy_to(buf, 0);
3126
}
3227

33-
void kernel2(int *ptr) __SYCL_DEVICE_ATTR {
28+
SYCL_EXTERNAL void kernel2(int *ptr) SYCL_ESIMD_FUNCTION {
3429
simd<int, 32> v1(0, 1);
3530
simd<int, 32> v0;
3631
v0.copy_from(ptr);
@@ -41,8 +36,9 @@ void kernel2(int *ptr) __SYCL_DEVICE_ATTR {
4136
// --- Negative tests.
4237

4338
// Incompatible target.
44-
void kernel3(accessor<int, 1, access::mode::read_write, access::target::local>
45-
&buf) __SYCL_DEVICE_ATTR {
39+
SYCL_EXTERNAL void
40+
kernel3(accessor<int, 1, access::mode::read_write, access::target::local> &buf)
41+
SYCL_ESIMD_FUNCTION {
4642
simd<int, 32> v1(0, 1);
4743
simd<int, 32> v0;
4844
// expected-error@+3 {{no matching member function for call to 'copy_from'}}
@@ -57,9 +53,9 @@ void kernel3(accessor<int, 1, access::mode::read_write, access::target::local>
5753
}
5854

5955
// Incompatible mode (write).
60-
void kernel4(
56+
SYCL_EXTERNAL void kernel4(
6157
accessor<int, 1, access::mode::write, access::target::global_buffer> &buf)
62-
__SYCL_DEVICE_ATTR {
58+
SYCL_ESIMD_FUNCTION {
6359
simd<int, 32> v;
6460
// expected-error@+3 {{no matching member function for call to 'copy_from'}}
6561
// expected-note@CL/sycl/INTEL/esimd/esimd.hpp:513 {{}}
@@ -68,8 +64,9 @@ void kernel4(
6864
}
6965

7066
// Incompatible mode (read).
71-
void kernel5(accessor<int, 1, access::mode::read, access::target::global_buffer>
72-
&buf) __SYCL_DEVICE_ATTR {
67+
SYCL_EXTERNAL void kernel5(
68+
accessor<int, 1, access::mode::read, access::target::global_buffer> &buf)
69+
SYCL_ESIMD_FUNCTION {
7370
simd<int, 32> v(0, 1);
7471
// expected-error@+3 {{no matching member function for call to 'copy_to'}}
7572
// expected-note@CL/sycl/INTEL/esimd/esimd.hpp:497 {{}}

0 commit comments

Comments
 (0)