25 std::bitset<DataLessPropKind::DataLessPropKindSize> DataLessProps)
26 : MDataLessProps(DataLessProps) {}
28 std::bitset<DataLessPropKind::DataLessPropKindSize> DataLessProps,
29 std::vector<std::shared_ptr<PropertyWithDataBase>> PropsWithData)
30 : MDataLessProps(DataLessProps),
31 MPropsWithData(
std::move(PropsWithData)) {}
34 template <
typename... PropsT,
class PropT>
36 std::is_base_of<DataLessPropertyBase, PropT>::value>
38 const int PropKind =
static_cast<int>(PropT::getKind());
43 template <
typename... PropsT,
class PropT>
45 std::is_base_of<PropertyWithDataBase, PropT>::value>
47 MPropsWithData.emplace_back(
new PropT(Prop));
52 template <
typename... PropsT,
class PropT>
54 !std::is_base_of<PropertyWithDataBase, PropT>::value &&
55 !std::is_base_of<DataLessPropertyBase, PropT>::value>
60 template <
typename PropT>
62 std::is_base_of<DataLessPropertyBase, PropT>::value,
bool>
64 const int PropKind =
static_cast<int>(PropT::getKind());
70 template <
typename PropT>
72 std::is_base_of<PropertyWithDataBase, PropT>::value,
bool>
74 const int PropKind =
static_cast<int>(PropT::getKind());
75 for (
const std::shared_ptr<PropertyWithDataBase> &Prop : MPropsWithData)
81 template <
typename PropT>
83 std::is_base_of<DataLessPropertyBase, PropT>::value, PropT>
89 template <
typename PropT>
91 std::is_base_of<PropertyWithDataBase, PropT>::value, PropT>
93 const int PropKind =
static_cast<int>(PropT::getKind());
95 throw sycl::invalid_object_error(
"The property is not found",
98 for (
const std::shared_ptr<PropertyWithDataBase> &Prop : MPropsWithData)
100 return *
static_cast<PropT *
>(Prop.get());
102 throw sycl::invalid_object_error(
"The property is not found",
107 const std::vector<std::shared_ptr<PropertyWithDataBase>> &PropsWithData) {
108 for (
auto &Prop : PropsWithData) {
110 delete_accessor_property_helper(
112 MPropsWithData.push_back(Prop);
119 auto It = MPropsWithData.begin();
120 for (; It != MPropsWithData.end(); ++It) {
121 if ((*It)->isSame(Kind))
124 if (It != MPropsWithData.end()) {
125 std::iter_swap(It, MPropsWithData.end() - 1);
126 MPropsWithData.pop_back();