Skip to content

Commit 1aaf075

Browse files
committed
Change which constructor is gated for devices
Signed-off-by: James Brodman <[email protected]>
1 parent e2130b1 commit 1aaf075

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

sycl/include/CL/sycl/multi_ptr.hpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,13 +44,15 @@ template <typename ElementType, access::address_space Space> class multi_ptr {
4444
multi_ptr() : m_Pointer(nullptr) {}
4545
multi_ptr(const multi_ptr &rhs) = default;
4646
multi_ptr(multi_ptr &&) = default;
47-
multi_ptr(pointer_t pointer) : m_Pointer(pointer) {}
4847
#ifdef __SYCL_DEVICE_ONLY__
48+
multi_ptr(pointer_t pointer) : m_Pointer(pointer) {}
49+
#endif
50+
4951
multi_ptr(ElementType *pointer) : m_Pointer((pointer_t)(pointer)) {
5052
// TODO An implementation should reject an argument if the deduced
5153
// address space is not compatible with Space.
5254
}
53-
#endif
55+
5456
multi_ptr(std::nullptr_t) : m_Pointer(nullptr) {}
5557
~multi_ptr() = default;
5658

0 commit comments

Comments
 (0)