@@ -496,13 +496,15 @@ using LocalAccessorImplPtr = std::shared_ptr<LocalAccessorImplHost>;
496
496
497
497
class __SYCL_EXPORT LocalAccessorBaseHost {
498
498
public:
499
- LocalAccessorBaseHost (sycl::range<3 > Size, int Dims, int ElemSize);
499
+ LocalAccessorBaseHost (sycl::range<3 > Size, int Dims, int ElemSize,
500
+ const property_list &PropertyList = {});
500
501
sycl::range<3 > &getSize ();
501
502
const sycl::range<3 > &getSize () const ;
502
503
void *getPtr ();
503
504
void *getPtr () const ;
504
505
int getNumOfDims ();
505
506
int getElementSize ();
507
+ const property_list &getPropList () const ;
506
508
507
509
protected:
508
510
template <class Obj >
@@ -2366,8 +2368,8 @@ class __SYCL_SPECIAL_CLASS local_accessor_base :
2366
2368
(void )propList;
2367
2369
}
2368
2370
#else
2369
- : LocalAccessorBaseHost(range<3 >{1 , 1 , 1 }, AdjustedDim, sizeof (DataT)) {
2370
- ( void ) propList;
2371
+ : LocalAccessorBaseHost(range<3 >{1 , 1 , 1 }, AdjustedDim, sizeof (DataT),
2372
+ propList) {
2371
2373
detail::constructorNotification (nullptr , LocalAccessorBaseHost::impl.get (),
2372
2374
access::target::local, AccessMode, CodeLoc);
2373
2375
GDBMethodsAnchor ();
@@ -2401,8 +2403,7 @@ class __SYCL_SPECIAL_CLASS local_accessor_base :
2401
2403
}
2402
2404
#else
2403
2405
: LocalAccessorBaseHost(detail::convertToArrayOfN<3 , 1 >(AllocationSize),
2404
- AdjustedDim, sizeof (DataT)) {
2405
- (void )propList;
2406
+ AdjustedDim, sizeof (DataT), propList) {
2406
2407
detail::constructorNotification (nullptr , LocalAccessorBaseHost::impl.get (),
2407
2408
access::target::local, AccessMode, CodeLoc);
2408
2409
GDBMethodsAnchor ();
@@ -2547,6 +2548,23 @@ class __SYCL_SPECIAL_CLASS __SYCL_TYPE(local_accessor) local_accessor
2547
2548
}
2548
2549
2549
2550
#endif
2551
+
2552
+ public:
2553
+ template <typename Property> bool has_property () const noexcept {
2554
+ #ifndef __SYCL_DEVICE_ONLY__
2555
+ return this ->getPropList ().template has_property <Property>();
2556
+ #else
2557
+ return false ;
2558
+ #endif
2559
+ }
2560
+
2561
+ template <typename Property> Property get_property () const {
2562
+ #ifndef __SYCL_DEVICE_ONLY__
2563
+ return this ->getPropList ().template get_property <Property>();
2564
+ #else
2565
+ return Property ();
2566
+ #endif
2567
+ }
2550
2568
};
2551
2569
2552
2570
// / Image accessors.
0 commit comments