Skip to content

Commit a14673f

Browse files
committed
Remove getPtr
Signed-off-by: Dmitry Sidorov <[email protected]>
1 parent 4b9fcca commit a14673f

File tree

1 file changed

+4
-12
lines changed

1 file changed

+4
-12
lines changed

sycl/include/CL/sycl/atomic.hpp

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -206,9 +206,9 @@ class atomic {
206206
addressSpace == access::address_space::global_space>::type>
207207
atomic(const atomic<T, access::address_space::global_device_space> &RHS) {
208208
#ifdef __SYCL_DEVICE_ONLY__
209-
Ptr = RHS.getPtr();
209+
Ptr = RHS.Ptr;
210210
#else
211-
Ptr = reinterpret_cast<std::atomic<T> *>(RHS.getPtr());
211+
Ptr = reinterpret_cast<std::atomic<T> *>(RHS.Ptr);
212212
#endif
213213
}
214214

@@ -218,20 +218,12 @@ class atomic {
218218
addressSpace == access::address_space::global_space>::type>
219219
atomic(const atomic<T, access::address_space::global_device_space> &&RHS) {
220220
#ifdef __SYCL_DEVICE_ONLY__
221-
Ptr = RHS.getPtr();
221+
Ptr = RHS.Ptr;
222222
#else
223-
Ptr = reinterpret_cast<std::atomic<T> *>(RHS.getPtr());
223+
Ptr = reinterpret_cast<std::atomic<T> *>(RHS.Ptr);
224224
#endif
225225
}
226226

227-
private:
228-
#ifdef __SYCL_DEVICE_ONLY__
229-
AtomicPtrType *getPtr() const { return Ptr; }
230-
#else
231-
std::atomic<T> *getPtr() const { return Ptr; }
232-
#endif
233-
234-
public:
235227
void store(T Operand, memory_order Order = memory_order::relaxed) {
236228
__spirv_AtomicStore(
237229
Ptr, SpirvScope, detail::getSPIRVMemorySemanticsMask(Order), Operand);

0 commit comments

Comments
 (0)