Skip to content

Commit

Permalink
Please consider the following formatting changes
Browse files Browse the repository at this point in the history
  • Loading branch information
alibuild committed Jan 24, 2025
1 parent e6f8ced commit 1909a32
Showing 1 changed file with 40 additions and 23 deletions.
63 changes: 40 additions & 23 deletions Framework/Core/include/Framework/ASoA.h
Original file line number Diff line number Diff line change
Expand Up @@ -1140,9 +1140,12 @@ struct TableIterator : IP, C... {
void doSetCurrentIndex(framework::pack<CL...>, TA* current)
{
(framework::overloaded{
[&current, this]<is_index_column CI> requires(!is_self_index_column<CI>) () { CI::setCurrent(current); },
[]<typename CI>(){}
}.template operator()<CL>(), ...);
[&current, this]<is_index_column CI>
requires(!is_self_index_column<CI>)
() { CI::setCurrent(current); },
[]<typename CI>() {}}
.template operator()<CL>(),
...);
}

template <typename CL>
Expand All @@ -1156,11 +1159,14 @@ struct TableIterator : IP, C... {
{
std::vector<o2::soa::Binding> result;
(framework::overloaded{
[this, &result]<is_index_column CI> requires(!is_self_index_column<CI>) () mutable {
result.emplace_back(CI::getCurrentRaw());
},
[]<typename CI>(){}
}.template operator()<Cs>(), ...);
[this, &result]<is_index_column CI>
requires(!is_self_index_column<CI>)
() mutable {
result.emplace_back(CI::getCurrentRaw());
},
[]<typename CI>() {}}
.template operator()<Cs>(),
...);
return result;
}

Expand All @@ -1179,9 +1185,12 @@ struct TableIterator : IP, C... {
void doSetCurrentIndexRaw(framework::pack<Cs...> p, std::vector<o2::soa::Binding>&& ptrs)
{
(framework::overloaded{
[&ptrs, p, this]<is_self_index_column CI> requires(!is_self_index_column<CI>) () { CI::setCurrentRaw(ptrs[framework::has_type_at_v<CI>(p)]); },
[]<typename CI>(){}
}.template operator()<Cs>(), ...);
[&ptrs, p, this]<is_self_index_column CI>
requires(!is_self_index_column<CI>)
() { CI::setCurrentRaw(ptrs[framework::has_type_at_v<CI>(p)]); },
[]<typename CI>() {}}
.template operator()<Cs>(),
...);
}

template <typename... Cs, typename I>
Expand All @@ -1190,9 +1199,10 @@ struct TableIterator : IP, C... {
o2::soa::Binding b;
b.bind(ptr);
(framework::overloaded{
[&ptr, &b, this]<is_self_index_column CI>() { CI::setCurrentRaw(b); },
[]<typename CI>(){}
}.template operator()<Cs>(), ...);
[&ptr, &b, this]<is_self_index_column CI>() { CI::setCurrentRaw(b); },
[]<typename CI>() {}}
.template operator()<Cs>(),
...);
}

void bindExternalIndicesRaw(std::vector<o2::soa::Binding>&& ptrs)
Expand Down Expand Up @@ -1388,18 +1398,24 @@ template <typename B, typename... C>
consteval static bool hasIndexTo(framework::pack<C...>&&)
{
return (framework::overloaded{
[]<is_index_column CI> requires(!is_self_index_column<CI>) () { return o2::soa::is_binding_compatible_v<B, typename CI::binding_t>(); },
[]<typename CI>(){ return false; }
}.template operator()<C>() || ...);
[]<is_index_column CI>
requires(!is_self_index_column<CI>)
() { return o2::soa::is_binding_compatible_v<B, typename CI::binding_t>(); },
[]<typename CI>() { return false; }}
.template operator()<C>() ||
...);
}

template <typename B, typename... C>
consteval static bool hasSortedIndexTo(framework::pack<C...>&&)
{
return (framework::overloaded{
[]<is_index_column CI> requires(!is_self_index_column<CI>) () {return (CI::sorted && o2::soa::is_binding_compatible_v<B, typename CI::binding_t>()); },
[]<typename CI>(){}
}.template operator()<C>() || ...);
[]<is_index_column CI>
requires(!is_self_index_column<CI>)
() { return (CI::sorted && o2::soa::is_binding_compatible_v<B, typename CI::binding_t>()); },
[]<typename CI>() {}}
.template operator()<C>() ||
...);
}

template <typename B, typename Z>
Expand Down Expand Up @@ -2085,9 +2101,10 @@ class Table
void doBindInternalIndicesExplicit(framework::pack<Cs...>, o2::soa::Binding binding)
{
(framework::overloaded{
[this, &binding]<is_self_index_column CI>() { static_cast<CI>(mBegin).setCurrentRaw(binding); },
[]<typename CI>(){}
}.template operator()<Cs>(), ...);
[this, &binding]<is_self_index_column CI>() { static_cast<CI>(mBegin).setCurrentRaw(binding); },
[]<typename CI>() {}}
.template operator()<Cs>(),
...);
}

void bindExternalIndicesRaw(std::vector<o2::soa::Binding>&& ptrs)
Expand Down

0 comments on commit 1909a32

Please sign in to comment.