@@ -1200,7 +1200,7 @@ class __SYCL_SPECIAL_CLASS accessor :
1200
1200
const property_list &PropertyList = {},
1201
1201
const detail::code_location CodeLoc = detail::code_location::current ())
1202
1202
: accessor (BufferRef, PropertyList, CodeLoc) {
1203
- deleteAccPropsFromBuf (detail::getSyclObjImpl (BufferRef).get ());
1203
+ adjustAccPropsInBuf (detail::getSyclObjImpl (BufferRef).get ());
1204
1204
}
1205
1205
1206
1206
template <typename T = DataT, int Dims = Dimensions, typename AllocatorT,
@@ -1215,7 +1215,7 @@ class __SYCL_SPECIAL_CLASS accessor :
1215
1215
{},
1216
1216
const detail::code_location CodeLoc = detail::code_location::current ())
1217
1217
: accessor (BufferRef, PropertyList, CodeLoc) {
1218
- addOrReplaceAccPropsInBuf (PropertyList, detail::getSyclObjImpl (BufferRef).get ());
1218
+ adjustAccPropsInBuf ( detail::getSyclObjImpl (BufferRef).get (), PropertyList );
1219
1219
}
1220
1220
#endif
1221
1221
@@ -1294,7 +1294,7 @@ class __SYCL_SPECIAL_CLASS accessor :
1294
1294
TagT, const property_list &PropertyList = {},
1295
1295
const detail::code_location CodeLoc = detail::code_location::current ())
1296
1296
: accessor (BufferRef, CommandGroupHandler, PropertyList, CodeLoc) {
1297
- deleteAccPropsFromBuf (detail::getSyclObjImpl (BufferRef).get ());
1297
+ adjustAccPropsInBuf (detail::getSyclObjImpl (BufferRef).get ());
1298
1298
}
1299
1299
1300
1300
template <typename T = DataT, int Dims = Dimensions, typename AllocatorT,
@@ -1310,7 +1310,7 @@ class __SYCL_SPECIAL_CLASS accessor :
1310
1310
{},
1311
1311
const detail::code_location CodeLoc = detail::code_location::current ())
1312
1312
: accessor (BufferRef, CommandGroupHandler, PropertyList, CodeLoc) {
1313
- addOrReplaceAccPropsInBuf (PropertyList, detail::getSyclObjImpl (BufferRef).get ());
1313
+ adjustAccPropsInBuf ( detail::getSyclObjImpl (BufferRef).get (), PropertyList );
1314
1314
}
1315
1315
1316
1316
#endif
@@ -1354,7 +1354,7 @@ class __SYCL_SPECIAL_CLASS accessor :
1354
1354
TagT, const property_list &PropertyList = {},
1355
1355
const detail::code_location CodeLoc = detail::code_location::current ())
1356
1356
: accessor (BufferRef, AccessRange, {}, PropertyList, CodeLoc) {
1357
- deleteAccPropsFromBuf (detail::getSyclObjImpl (BufferRef).get ());
1357
+ adjustAccPropsInBuf (detail::getSyclObjImpl (BufferRef).get ());
1358
1358
}
1359
1359
1360
1360
template <typename T = DataT, int Dims = Dimensions, typename AllocatorT,
@@ -1370,7 +1370,7 @@ class __SYCL_SPECIAL_CLASS accessor :
1370
1370
{},
1371
1371
const detail::code_location CodeLoc = detail::code_location::current ())
1372
1372
: accessor (BufferRef, AccessRange, {}, PropertyList, CodeLoc) {
1373
- addOrReplaceAccPropsInBuf (PropertyList, detail::getSyclObjImpl (BufferRef).get ());
1373
+ adjustAccPropsInBuf ( detail::getSyclObjImpl (BufferRef).get (), PropertyList );
1374
1374
}
1375
1375
#endif
1376
1376
@@ -1416,7 +1416,7 @@ class __SYCL_SPECIAL_CLASS accessor :
1416
1416
const detail::code_location CodeLoc = detail::code_location::current ())
1417
1417
: accessor (BufferRef, CommandGroupHandler, AccessRange, {}, PropertyList,
1418
1418
CodeLoc) {
1419
- deleteAccPropsFromBuf (detail::getSyclObjImpl (BufferRef).get ());
1419
+ adjustAccPropsInBuf (detail::getSyclObjImpl (BufferRef).get ());
1420
1420
}
1421
1421
1422
1422
template <typename T = DataT, int Dims = Dimensions, typename AllocatorT,
@@ -1433,7 +1433,7 @@ class __SYCL_SPECIAL_CLASS accessor :
1433
1433
const detail::code_location CodeLoc = detail::code_location::current ())
1434
1434
: accessor (BufferRef, CommandGroupHandler, AccessRange, {}, PropertyList,
1435
1435
CodeLoc) {
1436
- addOrReplaceAccPropsInBuf (PropertyList, detail::getSyclObjImpl (BufferRef).get ());
1436
+ adjustAccPropsInBuf ( detail::getSyclObjImpl (BufferRef).get (), PropertyList );
1437
1437
}
1438
1438
#endif
1439
1439
@@ -1515,7 +1515,7 @@ class __SYCL_SPECIAL_CLASS accessor :
1515
1515
id<Dimensions> AccessOffset, TagT, const property_list &PropertyList = {},
1516
1516
const detail::code_location CodeLoc = detail::code_location::current ())
1517
1517
: accessor (BufferRef, AccessRange, AccessOffset, PropertyList, CodeLoc) {
1518
- deleteAccPropsFromBuf (detail::getSyclObjImpl (BufferRef).get ());
1518
+ adjustAccPropsInBuf (detail::getSyclObjImpl (BufferRef).get ());
1519
1519
}
1520
1520
1521
1521
template <typename T = DataT, int Dims = Dimensions, typename AllocatorT,
@@ -1531,7 +1531,7 @@ class __SYCL_SPECIAL_CLASS accessor :
1531
1531
{},
1532
1532
const detail::code_location CodeLoc = detail::code_location::current ())
1533
1533
: accessor (BufferRef, AccessRange, AccessOffset, PropertyList, CodeLoc) {
1534
- addOrReplaceAccPropsInBuf (PropertyList, detail::getSyclObjImpl (BufferRef).get ());
1534
+ adjustAccPropsInBuf ( detail::getSyclObjImpl (BufferRef).get (), PropertyList );
1535
1535
}
1536
1536
#endif
1537
1537
@@ -1614,7 +1614,7 @@ class __SYCL_SPECIAL_CLASS accessor :
1614
1614
const detail::code_location CodeLoc = detail::code_location::current ())
1615
1615
: accessor (BufferRef, CommandGroupHandler, AccessRange, AccessOffset,
1616
1616
PropertyList, CodeLoc) {
1617
- deleteAccPropsFromBuf (detail::getSyclObjImpl (BufferRef).get ());
1617
+ adjustAccPropsInBuf (detail::getSyclObjImpl (BufferRef).get ());
1618
1618
}
1619
1619
1620
1620
template <typename T = DataT, int Dims = Dimensions, typename AllocatorT,
@@ -1631,7 +1631,7 @@ class __SYCL_SPECIAL_CLASS accessor :
1631
1631
const detail::code_location CodeLoc = detail::code_location::current ())
1632
1632
: accessor (BufferRef, CommandGroupHandler, AccessRange, AccessOffset,
1633
1633
PropertyList, CodeLoc) {
1634
- addOrReplaceAccPropsInBuf (PropertyList, detail::getSyclObjImpl (BufferRef).get ());
1634
+ adjustAccPropsInBuf ( detail::getSyclObjImpl (BufferRef).get (), PropertyList );
1635
1635
}
1636
1636
#endif
1637
1637
@@ -1793,12 +1793,10 @@ class __SYCL_SPECIAL_CLASS accessor :
1793
1793
PI_INVALID_VALUE);
1794
1794
}
1795
1795
1796
- // / my TODO: rename function
1797
1796
#if __cplusplus >= 201703L
1798
1797
template <typename ... PropTypes>
1799
- void addOrReplaceAccPropsInBuf (
1800
- const sycl::ext::oneapi::accessor_property_list<PropTypes...> &PropertyList,
1801
- detail::SYCLMemObjI *SYCLMemObject) {
1798
+ void adjustAccPropsInBuf (detail::SYCLMemObjI *SYCLMemObject,
1799
+ const sycl::ext::oneapi::accessor_property_list<PropTypes...> &PropertyList = {}) {
1802
1800
if constexpr (PropertyListT::template has_property<
1803
1801
sycl::ext::intel::property::buffer_location>()) {
1804
1802
auto location = (PropertyListT::template get_property<
@@ -1808,13 +1806,6 @@ class __SYCL_SPECIAL_CLASS accessor :
1808
1806
} else {
1809
1807
deleteAccPropsFromBuf (SYCLMemObject);
1810
1808
}
1811
- /* if (PropertyList.template has_property<sycl::ext::intel::property::buffer_location>()){
1812
- auto location = PropertyList.template get_property<sycl::ext::intel::property::buffer_location>().get_location();
1813
- property_list PropList{sycl::property::buffer::detail::buffer_location(location)};
1814
- SYCLMemObject->addOrReplaceAccessorProperties(PropList);
1815
- } else {
1816
- deleteAccPropsFromBuf(SYCLMemObject);
1817
- }*/
1818
1809
}
1819
1810
1820
1811
void deleteAccPropsFromBuf (detail::SYCLMemObjI *SYCLMemObject) {
0 commit comments