@@ -67,8 +67,8 @@ class subscript_obj<accessorDim, dataT, 1, accessMode, accessTarget,
67
67
68
68
dataT &operator [](size_t index) {
69
69
ids[accessorDim - 1 ] = index;
70
- return accRef.__impl ()->Data [getOffsetForId (
71
- accRef.__impl ()->Range , ids, accRef.__impl ()->Offset )];
70
+ return accRef.__get_impl ()->Data [getOffsetForId (
71
+ accRef.__get_impl ()->Range , ids, accRef.__get_impl ()->Offset )];
72
72
}
73
73
};
74
74
@@ -89,8 +89,8 @@ class subscript_obj<accessorDim, dataT, 1, access::mode::read, accessTarget,
89
89
typename detail::remove_AS<dataT>::type
90
90
operator [](size_t index) {
91
91
ids[accessorDim - 1 ] = index;
92
- return accRef.__impl ()->Data [getOffsetForId (
93
- accRef.__impl ()->Range , ids, accRef.__impl ()->Offset )];
92
+ return accRef.__get_impl ()->Data [getOffsetForId (
93
+ accRef.__get_impl ()->Range , ids, accRef.__get_impl ()->Offset )];
94
94
}
95
95
};
96
96
@@ -307,11 +307,11 @@ class accessor_base {
307
307
using _ImplT =
308
308
accessor_impl<dataT, dimensions, accessMode, accessTarget, isPlaceholder>;
309
309
310
- const _ImplT *__impl () const {
310
+ const _ImplT *__get_impl () const {
311
311
return reinterpret_cast <const _ImplT *>(this );
312
312
}
313
313
314
- _ImplT *__impl () { return reinterpret_cast <_ImplT *>(this ); }
314
+ _ImplT *__get_impl () { return reinterpret_cast <_ImplT *>(this ); }
315
315
316
316
static_assert (
317
317
std::is_same<typename DeviceValueType<dataT, accessTarget>::type,
@@ -347,15 +347,15 @@ SYCL_ACCESSOR_SUBCLASS(accessor_common, accessor_base, true /* always */) {
347
347
size_t get_size () const { return this ->get_count () * sizeof (dataT); }
348
348
349
349
// Returns the number of accessed elements.
350
- size_t get_count () const { return this ->__impl ()->get_count (); }
350
+ size_t get_count () const { return this ->__get_impl ()->get_count (); }
351
351
352
352
template <int Dimensions = dimensions>
353
353
typename std::enable_if<(Dimensions > 0 ), range<Dimensions>>::type
354
- get_range () const { return this ->__impl ()->Range ; }
354
+ get_range () const { return this ->__get_impl ()->Range ; }
355
355
356
356
template <int Dimensions = dimensions>
357
357
typename std::enable_if<(Dimensions > 0 ), id<Dimensions>>::type
358
- get_offset () const { return this ->__impl ()->Offset ; }
358
+ get_offset () const { return this ->__get_impl ()->Offset ; }
359
359
};
360
360
361
361
SYCL_ACCESSOR_SUBCLASS (accessor_opdata_w, accessor_common,
@@ -365,7 +365,7 @@ SYCL_ACCESSOR_SUBCLASS(accessor_opdata_w, accessor_common,
365
365
accessMode == access::mode::discard_read_write) &&
366
366
dimensions == 0 ) {
367
367
operator dataT &() const {
368
- return this ->__impl ()->Data [0 ];
368
+ return this ->__get_impl ()->Data [0 ];
369
369
}
370
370
};
371
371
@@ -376,7 +376,7 @@ SYCL_ACCESSOR_SUBCLASS(accessor_subscript_wn, accessor_opdata_w,
376
376
accessMode == access::mode::discard_read_write) &&
377
377
dimensions > 0 ) {
378
378
dataT &operator [](id<dimensions> index) const {
379
- return this ->__impl ()->Data [getOffsetForId (
379
+ return this ->__get_impl ()->Data [getOffsetForId (
380
380
this ->get_range (), index, this ->get_offset ())];
381
381
}
382
382
@@ -407,23 +407,23 @@ SYCL_ACCESSOR_SUBCLASS(accessor_subscript_w, accessor_subscript_wn,
407
407
getOffsetForId (this ->get_range (), index, this ->get_offset ()));
408
408
}
409
409
dataT &operator [](size_t index) const {
410
- return this ->__impl ()->Data [index];
410
+ return this ->__get_impl ()->Data [index];
411
411
}
412
412
};
413
413
414
414
SYCL_ACCESSOR_SUBCLASS (accessor_opdata_r, accessor_subscript_w,
415
415
accessMode == access::mode::read && dimensions == 0 ) {
416
416
using PureType = typename detail::remove_AS<dataT>::type;
417
417
operator PureType () const {
418
- return this ->__impl ()->Data [0 ];
418
+ return this ->__get_impl ()->Data [0 ];
419
419
}
420
420
};
421
421
422
422
SYCL_ACCESSOR_SUBCLASS (accessor_subscript_rn, accessor_opdata_r,
423
423
accessMode == access::mode::read && dimensions > 0 ) {
424
424
typename detail::remove_AS<dataT>::type
425
425
operator [](id<dimensions> index) const {
426
- return this ->__impl ()->Data [getOffsetForId (
426
+ return this ->__get_impl ()->Data [getOffsetForId (
427
427
this ->get_range (), index, this ->get_offset ())];
428
428
}
429
429
@@ -446,7 +446,7 @@ SYCL_ACCESSOR_SUBCLASS(accessor_subscript_r, accessor_subscript_rn,
446
446
}
447
447
typename detail::remove_AS<dataT>::type
448
448
operator [](size_t index) const {
449
- return this ->__impl ()->Data [index];
449
+ return this ->__get_impl ()->Data [index];
450
450
}
451
451
};
452
452
@@ -468,7 +468,7 @@ SYCL_ACCESSOR_SUBCLASS(accessor_subscript_atomic_eq0, accessor_subscript_r,
468
468
getAddressSpace<accessTarget>::value;
469
469
operator atomic<PureType, addressSpace>() const {
470
470
return atomic<PureType, addressSpace>(
471
- multi_ptr<PureType, addressSpace>(&(this ->__impl ()->Data [0 ])));
471
+ multi_ptr<PureType, addressSpace>(&(this ->__get_impl ()->Data [0 ])));
472
472
}
473
473
};
474
474
@@ -481,8 +481,8 @@ SYCL_ACCESSOR_SUBCLASS(accessor_subscript_atomic_gt0,
481
481
getAddressSpace<accessTarget>::value;
482
482
atomic<PureType, addressSpace> operator [](id<dimensions> index) const {
483
483
return atomic<PureType, addressSpace>(
484
- multi_ptr<PureType, addressSpace>(&(this ->__impl ()->Data [getOffsetForId (
485
- this ->__impl ()->Range , index, this ->__impl ()->Offset )])));
484
+ multi_ptr<PureType, addressSpace>(&(this ->__get_impl ()->Data [getOffsetForId (
485
+ this ->__get_impl ()->Range , index, this ->__get_impl ()->Offset )])));
486
486
}
487
487
};
488
488
@@ -495,7 +495,7 @@ SYCL_ACCESSOR_SUBCLASS(accessor_subscript_atomic_eq1,
495
495
getAddressSpace<accessTarget>::value;
496
496
atomic<PureType, addressSpace> operator [](size_t index) const {
497
497
return atomic<PureType, addressSpace>(
498
- multi_ptr<PureType, addressSpace>(&(this ->__impl ()->Data [index])));
498
+ multi_ptr<PureType, addressSpace>(&(this ->__get_impl ()->Data [index])));
499
499
}
500
500
};
501
501
@@ -510,31 +510,31 @@ SYCL_ACCESSOR_SUBCLASS(accessor_pointer, accessor_subscript_atomic_eq1, true) {
510
510
typename std::enable_if<(AccessTarget == access::target::host_buffer),
511
511
dataT *>::type
512
512
get_pointer () const {
513
- return this ->__impl ()->Data ;
513
+ return this ->__get_impl ()->Data ;
514
514
}
515
515
/* Available only when: accessTarget == access::target::global_buffer */
516
516
template <typename DataT = typename detail::remove_AS<dataT>::type,
517
517
access::target AccessTarget = accessTarget>
518
518
typename std::enable_if<(AccessTarget == access::target::global_buffer),
519
519
global_ptr<DataT>>::type
520
520
get_pointer () const {
521
- return global_ptr<DataT>(this ->__impl ()->Data );
521
+ return global_ptr<DataT>(this ->__get_impl ()->Data );
522
522
}
523
523
/* Available only when: accessTarget == access::target::constant_buffer */
524
524
template <typename DataT = typename detail::remove_AS<dataT>::type,
525
525
access::target AccessTarget = accessTarget>
526
526
typename std::enable_if<(AccessTarget == access::target::constant_buffer),
527
527
constant_ptr<DataT>>::type
528
528
get_pointer () const {
529
- return constant_ptr<DataT>(this ->__impl ()->Data );
529
+ return constant_ptr<DataT>(this ->__get_impl ()->Data );
530
530
}
531
531
/* Available only when: accessTarget == access::target::local */
532
532
template <typename DataT = typename detail::remove_AS<dataT>::type,
533
533
access::target AccessTarget = accessTarget>
534
534
typename std::enable_if<(AccessTarget == access::target::local),
535
535
local_ptr<DataT>>::type
536
536
get_pointer () const {
537
- return local_ptr<DataT>(this ->__impl ()->Data );
537
+ return local_ptr<DataT>(this ->__get_impl ()->Data );
538
538
}
539
539
};
540
540
0 commit comments