Skip to content

Commit 09032a4

Browse files
[SYCL] Unify SPIR/non-SPIR paths for atomic_ref ctor (#17196)
This became possible sometime after one/all of * #15394 * #15543 * #16604
1 parent 1ba21f6 commit 09032a4

File tree

1 file changed

+0
-7
lines changed

1 file changed

+0
-7
lines changed

sycl/include/sycl/atomic_ref.hpp

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -158,16 +158,9 @@ class atomic_ref_base {
158158
}
159159

160160
#ifdef __SYCL_DEVICE_ONLY__
161-
#if defined(__SPIR__)
162161
explicit atomic_ref_base(T &ref)
163162
: ptr(ext::oneapi::experimental::static_address_cast<AddressSpace>(
164163
&ref)) {}
165-
#else
166-
// CUDA/HIP don't support `ext::oneapi::experimental::static_address_cast`
167-
// yet.
168-
explicit atomic_ref_base(T &ref)
169-
: ptr(address_space_cast<AddressSpace, access::decorated::no>(&ref)) {}
170-
#endif
171164
#else
172165
// FIXME: This reinterpret_cast is UB, but happens to work for now
173166
explicit atomic_ref_base(T &ref)

0 commit comments

Comments
 (0)