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 authored and ktf committed Mar 7, 2024
1 parent e69d5a3 commit ae6bfc1
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 15 deletions.
12 changes: 6 additions & 6 deletions Framework/Core/include/Framework/ASoA.h
Original file line number Diff line number Diff line change
Expand Up @@ -665,9 +665,9 @@ struct FilteredIndexPolicy : IndexPolicyBase {
return O2_BUILTIN_UNLIKELY(mSelectionRow == sentinel.index);
}

/// Move iterator to one after the end. Since this is a view
/// we move the mSelectionRow to one past the view size and
/// the mRowIndex to one past the last entry in the selection
/// Move iterator to one after the end. Since this is a view
/// we move the mSelectionRow to one past the view size and
/// the mRowIndex to one past the last entry in the selection
void moveToEnd()
{
this->mSelectionRow = this->mMaxSelection;
Expand Down Expand Up @@ -2862,7 +2862,7 @@ class FilteredBase : public T
using external_index_columns_t = typename T::external_index_columns_t;

using iterator = decltype([]<typename... Os>(framework::pack<Os...>) { return typename table_t::template RowViewFiltered<FilteredBase<T>, Os...>{}; }(originals{}));
using unfiltered_iterator = decltype([]<typename... Os>(framework::pack<Os...>){ return typename table_t::template RowView<FilteredBase<T>, Os...>{}; }(originals{}));
using unfiltered_iterator = decltype([]<typename... Os>(framework::pack<Os...>) { return typename table_t::template RowView<FilteredBase<T>, Os...>{}; }(originals{}));
using const_iterator = iterator;

FilteredBase(std::vector<std::shared_ptr<arrow::Table>>&& tables, gandiva::Selection const& selection, uint64_t offset = 0)
Expand Down Expand Up @@ -3126,7 +3126,7 @@ class Filtered : public FilteredBase<T>
using originals = originals_pack_t<T>;

using iterator = decltype([]<typename... Os>(framework::pack<Os...>) { return typename table_t::template RowViewFiltered<Filtered<T>, Os...>{}; }(originals{}));
using unfiltered_iterator = decltype([]<typename... Os>(framework::pack<Os...>){ return typename table_t::template RowView<Filtered<T>, Os...>{}; }(originals{}));
using unfiltered_iterator = decltype([]<typename... Os>(framework::pack<Os...>) { return typename table_t::template RowView<Filtered<T>, Os...>{}; }(originals{}));
using const_iterator = iterator;

iterator begin()
Expand Down Expand Up @@ -3283,7 +3283,7 @@ class Filtered<Filtered<T>> : public FilteredBase<typename T::table_t>
using table_t = typename FilteredBase<typename T::table_t>::table_t;
using originals = originals_pack_t<T>;
using iterator = decltype([]<typename... Os>(framework::pack<Os...>) { return typename table_t::template RowViewFiltered<Filtered<Filtered<T>>, Os...>{}; }(originals{}));
using unfiltered_iterator = decltype([]<typename... Os>(framework::pack<Os...>){ return typename table_t::template RowView<Filtered<Filtered<T>>, Os...>{}; }(originals{}));
using unfiltered_iterator = decltype([]<typename... Os>(framework::pack<Os...>) { return typename table_t::template RowView<Filtered<Filtered<T>>, Os...>{}; }(originals{}));
using const_iterator = iterator;

iterator begin()
Expand Down
17 changes: 8 additions & 9 deletions Framework/Core/test/test_GroupSlicer.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -479,17 +479,17 @@ namespace parts
DECLARE_SOA_INDEX_COLUMN(Event, event);
DECLARE_SOA_COLUMN(Property, property, int);
DECLARE_SOA_SELF_SLICE_INDEX_COLUMN(Relatives, relatives);
}
} // namespace parts
DECLARE_SOA_TABLE(Parts, "AOD", "PRTS", soa::Index<>, parts::EventId, parts::Property, parts::RelativesIdSlice);

namespace things
{
DECLARE_SOA_INDEX_COLUMN(Event, event);
DECLARE_SOA_INDEX_COLUMN(Part, part);
}
} // namespace things
DECLARE_SOA_TABLE(Things, "AOD", "THNGS", soa::Index<>, things::EventId, things::PartId);

}
} // namespace o2::aod

template <typename... As>
static void overwriteInternalIndices(std::tuple<As...>& dest, std::tuple<As...> const& src)
Expand Down Expand Up @@ -520,7 +520,7 @@ TEST_CASE("GroupSlicerMismatchedUnsortedFilteredGroupsWithSelfIndex")
if (filler[0] > filler[1]) {
std::swap(filler[0], filler[1]);
}
partsWriter(0, std::floor(i/10.), i, filler);
partsWriter(0, std::floor(i / 10.), i, filler);
}
auto partsTable = builderP.finalize();

Expand Down Expand Up @@ -560,19 +560,19 @@ TEST_CASE("GroupSlicerMismatchedUnsortedFilteredGroupsWithSelfIndex")
for (auto& thing : ts) {
if (thing.has_part()) {
auto part = thing.part_as<FilteredParts>();
REQUIRE(std::is_same_v<std::decay_t<decltype(part)>::parent_t,FilteredParts>);
REQUIRE(std::is_same_v<std::decay_t<decltype(part)>::parent_t, FilteredParts>);
auto rs = part.relatives_as<std::decay_t<decltype(part)::parent_t>>();
REQUIRE(std::is_same_v<std::decay_t<decltype(rs)>, FilteredParts>);
for (auto& r : rs) {
REQUIRE(std::is_same_v<std::decay_t<decltype(r)>::parent_t,FilteredParts>);
REQUIRE(std::is_same_v<std::decay_t<decltype(r)>::parent_t, FilteredParts>);
auto rss = r.relatives_as<std::decay_t<decltype(r)>::parent_t>();
REQUIRE(std::is_same_v<std::decay_t<decltype(rss)>, FilteredParts>);
for (auto& rr : rss) {
REQUIRE(std::is_same_v<std::decay_t<decltype(rr)>::parent_t,FilteredParts>);
REQUIRE(std::is_same_v<std::decay_t<decltype(rr)>::parent_t, FilteredParts>);
auto rsss = rr.relatives_as<std::decay_t<decltype(rr)>::parent_t>();
REQUIRE(std::is_same_v<std::decay_t<decltype(rsss)>, FilteredParts>);
for (auto& rrr : rsss) {
REQUIRE(std::is_same_v<std::decay_t<decltype(rrr)>::parent_t,FilteredParts>);
REQUIRE(std::is_same_v<std::decay_t<decltype(rrr)>::parent_t, FilteredParts>);
auto rssss = rrr.relatives_as<std::decay_t<decltype(rrr)>::parent_t>();
REQUIRE(std::is_same_v<std::decay_t<decltype(rssss)>, FilteredParts>);
}
Expand All @@ -581,7 +581,6 @@ TEST_CASE("GroupSlicerMismatchedUnsortedFilteredGroupsWithSelfIndex")
}
}
}

}

TEST_CASE("EmptySliceables")
Expand Down

0 comments on commit ae6bfc1

Please sign in to comment.