File tree Expand file tree Collapse file tree 2 files changed +8
-5
lines changed Expand file tree Collapse file tree 2 files changed +8
-5
lines changed Original file line number Diff line number Diff line change @@ -168,7 +168,8 @@ namespace sycl {
168
168
169
169
template <typename T, access::address_space addressSpace =
170
170
access::address_space::global_space>
171
- class atomic {
171
+ class __SYCL2020_DEPRECATED (
172
+ " sycl::atomic is deprecated since SYCL 2020" ) atomic {
172
173
friend class atomic <T, access::address_space::global_space>;
173
174
static_assert (detail::IsValidAtomicType<T>::value,
174
175
" Invalid SYCL atomic type. Valid types are: int, "
Original file line number Diff line number Diff line change 1
1
// RUN: %clangxx %fsycl-host-only -fsyntax-only -sycl-std=2020 -Xclang -verify -Xclang -verify-ignore-unexpected=note %s -o %t.out
2
- // RUN: %clangxx %fsycl-host-only -fsyntax-only -Xclang -verify -Xclang -verify-ignore-unexpected=note %s -o %t.out
3
- // RUN: %clangxx %fsycl-host-only -fsyntax-only -sycl-std=2017 -Xclang -verify -Xclang -verify-ignore-unexpected=note %s -o %t.out
4
- // RUN: %clangxx %fsycl-host-only -fsyntax-only -sycl-std=1.2.1 -Xclang -verify -Xclang -verify-ignore-unexpected=note %s -o %t.out
5
2
6
3
#include < CL/sycl.hpp>
7
4
#include < sycl/ext/intel/online_compiler.hpp>
@@ -176,6 +173,11 @@ int main() {
176
173
177
174
// expected-warning@+1{{'barrier' is deprecated: use 'ext_oneapi_barrier' instead}}
178
175
Queue.submit ([&](sycl::handler &CGH) { CGH.barrier (); });
179
-
176
+
177
+ cl::sycl::multi_ptr<int , cl::sycl::access::address_space::global_space> a (
178
+ nullptr );
179
+ // expected-warning@+1 {{'atomic<int, sycl::access::address_space::global_space>' is deprecated: sycl::atomic is deprecated since SYCL 2020}}
180
+ cl::sycl::atomic<int > b (a);
181
+
180
182
return 0 ;
181
183
}
You can’t perform that action at this time.
0 commit comments