@@ -935,7 +935,7 @@ class __SYCL2020_DEPRECATED(
935
935
std::is_const_v<ET> && std::is_same_v<ET, ElementType>>>
936
936
multi_ptr (
937
937
local_accessor<typename std::remove_const_t <ET>, dimensions> Accessor)
938
- : m_Pointer (detail::cast_AS< pointer_t >( Accessor.get_pointer () )) {}
938
+ : multi_ptr ( Accessor.get_pointer ()) {}
939
939
940
940
// Only if Space == constant_space and element type is const
941
941
template <
@@ -1103,6 +1103,10 @@ class __SYCL2020_DEPRECATED(
1103
1103
multi_ptr (multi_ptr &&) = default ;
1104
1104
multi_ptr (pointer_t pointer) : m_Pointer (pointer) {}
1105
1105
#ifdef __SYCL_DEVICE_ONLY__
1106
+ template <
1107
+ typename RelayPointerT = pointer_t ,
1108
+ typename = std::enable_if_t <std::is_same_v<RelayPointerT, pointer_t > &&
1109
+ !std::is_same_v<RelayPointerT, void *>>>
1106
1110
multi_ptr (void *pointer) : m_Pointer (detail::cast_AS<pointer_t >(pointer)) {
1107
1111
// TODO An implementation should reject an argument if the deduced
1108
1112
// address space is not compatible with Space.
@@ -1133,6 +1137,10 @@ class __SYCL2020_DEPRECATED(
1133
1137
return *this ;
1134
1138
}
1135
1139
#ifdef __SYCL_DEVICE_ONLY__
1140
+ template <
1141
+ typename RelayPointerT = pointer_t ,
1142
+ typename = std::enable_if_t <std::is_same_v<RelayPointerT, pointer_t > &&
1143
+ !std::is_same_v<RelayPointerT, void *>>>
1136
1144
multi_ptr &operator =(void *pointer) {
1137
1145
// TODO An implementation should reject an argument if the deduced
1138
1146
// address space is not compatible with Space.
@@ -1180,7 +1188,7 @@ class __SYCL2020_DEPRECATED(
1180
1188
_Space == Space && (Space == access::address_space::generic_space ||
1181
1189
Space == access::address_space::local_space)>>
1182
1190
multi_ptr (local_accessor<ElementType, dimensions> Accessor)
1183
- : m_Pointer (detail::cast_AS< pointer_t >( Accessor.get_pointer () )) {}
1191
+ : multi_ptr ( Accessor.get_pointer ()) {}
1184
1192
1185
1193
// Only if Space == constant_space
1186
1194
template <
@@ -1251,6 +1259,10 @@ class __SYCL2020_DEPRECATED(
1251
1259
multi_ptr (multi_ptr &&) = default ;
1252
1260
multi_ptr (pointer_t pointer) : m_Pointer (pointer) {}
1253
1261
#ifdef __SYCL_DEVICE_ONLY__
1262
+ template <
1263
+ typename RelayPointerT = pointer_t ,
1264
+ typename = std::enable_if_t <std::is_same_v<RelayPointerT, pointer_t > &&
1265
+ !std::is_same_v<RelayPointerT, const void *>>>
1254
1266
multi_ptr (const void *pointer)
1255
1267
: m_Pointer (detail::cast_AS<pointer_t >(pointer)) {
1256
1268
// TODO An implementation should reject an argument if the deduced
@@ -1282,6 +1294,10 @@ class __SYCL2020_DEPRECATED(
1282
1294
return *this ;
1283
1295
}
1284
1296
#ifdef __SYCL_DEVICE_ONLY__
1297
+ template <
1298
+ typename RelayPointerT = pointer_t ,
1299
+ typename = std::enable_if_t <std::is_same_v<RelayPointerT, pointer_t > &&
1300
+ !std::is_same_v<RelayPointerT, const void *>>>
1285
1301
multi_ptr &operator =(const void *pointer) {
1286
1302
// TODO An implementation should reject an argument if the deduced
1287
1303
// address space is not compatible with Space.
@@ -1329,7 +1345,7 @@ class __SYCL2020_DEPRECATED(
1329
1345
_Space == Space && (Space == access::address_space::generic_space ||
1330
1346
Space == access::address_space::local_space)>>
1331
1347
multi_ptr (local_accessor<ElementType, dimensions> Accessor)
1332
- : m_Pointer (detail::cast_AS< pointer_t >( Accessor.get_pointer () )) {}
1348
+ : multi_ptr ( Accessor.get_pointer ()) {}
1333
1349
1334
1350
// Only if Space == constant_space
1335
1351
template <
0 commit comments