1
- // RUN: %{build} -O3 -o %t.out - Xsycl-target-backend=nvptx64-nvidia-cuda --cuda-gpu-arch=sm_70
1
+ // RUN: %{build} -O3 -o %t.out %if any-device-is-cuda %{ - Xsycl-target-backend=nvptx64-nvidia-cuda --cuda-gpu-arch=sm_70 %}
2
2
// RUN: %{run} %t.out
3
3
4
4
// NOTE: Tests fetch_add for acquire and release memory ordering.
@@ -25,7 +25,7 @@ template <memory_order order> void test_acquire_global() {
25
25
error_buf.template get_access <access::mode::read_write>(cgh);
26
26
auto val = val_buf.template get_access <access::mode::read_write>(cgh);
27
27
cgh.parallel_for (range<1 >(N_items), [=](item<1 > it) {
28
- volatile int *val_p = val.get_pointer ();
28
+ volatile int *val_p = val.get_multi_ptr <access::decorated::no>(). get ();
29
29
auto atm0 =
30
30
atomic_ref<int , memory_order::relaxed, memory_scope::device,
31
31
access::address_space::global_space>(val[0 ]);
@@ -74,7 +74,8 @@ template <memory_order order> void test_acquire_local() {
74
74
val[0 ] = 0 ;
75
75
val[1 ] = 0 ;
76
76
it.barrier (access::fence_space::local_space);
77
- volatile int *val_p = val.get_pointer ();
77
+ volatile int *val_p =
78
+ val.get_multi_ptr <access::decorated::no>().get ();
78
79
auto atm0 =
79
80
atomic_ref<int , memory_order::relaxed, memory_scope::device,
80
81
access::address_space::local_space>(val[0 ]);
@@ -116,7 +117,7 @@ template <memory_order order> void test_release_global() {
116
117
error_buf.template get_access <access::mode::read_write>(cgh);
117
118
auto val = val_buf.template get_access <access::mode::read_write>(cgh);
118
119
cgh.parallel_for (range<1 >(N_items), [=](item<1 > it) {
119
- volatile int *val_p = val.get_pointer ();
120
+ volatile int *val_p = val.get_multi_ptr <access::decorated::no>(). get ();
120
121
auto atm0 =
121
122
atomic_ref<int , memory_order::relaxed, memory_scope::device,
122
123
access::address_space::global_space>(val[0 ]);
@@ -165,7 +166,8 @@ template <memory_order order> void test_release_local() {
165
166
val[0 ] = 0 ;
166
167
val[1 ] = 0 ;
167
168
it.barrier (access::fence_space::local_space);
168
- volatile int *val_p = val.get_pointer ();
169
+ volatile int *val_p =
170
+ val.get_multi_ptr <access::decorated::no>().get ();
169
171
auto atm0 =
170
172
atomic_ref<int , memory_order::relaxed, memory_scope::device,
171
173
access::address_space::local_space>(val[0 ]);
0 commit comments