Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
63 changes: 21 additions & 42 deletions Framework/Core/include/Framework/ASoA.h
Original file line number Diff line number Diff line change
Expand Up @@ -222,8 +222,7 @@ static consteval int getIndexPosToKey_impl()
/// Base type for table metadata
template <typename D, typename... Cs>
struct TableMetadata {
static constexpr void isTableMetadata()
{};
static constexpr void isTableMetadata() {};
using columns = framework::pack<Cs...>;
using persistent_columns_t = framework::selected_pack<soa::is_persistent_column_t, Cs...>;
using external_index_columns_t = framework::selected_pack<soa::is_external_index_t, Cs...>;
Expand Down Expand Up @@ -255,17 +254,15 @@ struct TableMetadata {

template <typename D>
struct MetadataTrait {
static constexpr void isMetadataTrait()
{};
static constexpr void isMetadataTrait() {};
using metadata = void;
};

/// Special struc to map the string hash back to the string and wrap a string literal into the
/// type signature
template <uint32_t H>
struct Hash {
static constexpr void isHash()
{};
static constexpr void isHash() {};
static constexpr uint32_t hash = H;
static constexpr char const* const str{""};
};
Expand All @@ -287,8 +284,7 @@ consteval auto filterForKey()
#define O2HASH(_Str_) \
template <> \
struct Hash<_Str_ ""_h> { \
static constexpr void isHash() \
{}; \
static constexpr void isHash() {}; \
static constexpr uint32_t hash = _Str_ ""_h; \
static constexpr char const* const str{_Str_}; \
};
Expand All @@ -297,10 +293,8 @@ consteval auto filterForKey()
#define O2ORIGIN(_Str_) \
template <> \
struct Hash<_Str_ ""_h> { \
static constexpr void isHash() \
{}; \
static constexpr void isOriginHash() \
{}; \
static constexpr void isHash() {}; \
static constexpr void isOriginHash() {}; \
static constexpr header::DataOrigin origin{_Str_}; \
static constexpr uint32_t hash = _Str_ ""_h; \
static constexpr char const* const str{_Str_}; \
Expand Down Expand Up @@ -663,8 +657,7 @@ class ColumnIterator : ChunkingPolicy

template <typename T, typename INHERIT>
struct Column {
static constexpr void isIteratableColumn()
{};
static constexpr void isIteratableColumn() {};

using inherited_t = INHERIT;
Column(ColumnIterator<T> const& it)
Expand Down Expand Up @@ -700,17 +693,15 @@ struct Column {
/// method call.
template <typename F, typename INHERIT>
struct DynamicColumn {
static constexpr void isDynamicColumn()
{};
static constexpr void isDynamicColumn() {};
using inherited_t = INHERIT;

static constexpr const char* const& columnLabel() { return INHERIT::mLabel; }
};

template <typename INHERIT>
struct IndexColumn {
static constexpr void isEnumeratingColumn()
{};
static constexpr void isEnumeratingColumn() {};
using inherited_t = INHERIT;
static constexpr const uint32_t hash = 0;

Expand All @@ -719,8 +710,7 @@ struct IndexColumn {

template <typename INHERIT>
struct MarkerColumn {
static constexpr void isMarkingColumn()
{};
static constexpr void isMarkingColumn() {};
using inherited_t = INHERIT;
static constexpr const uint32_t hash = 0;

Expand Down Expand Up @@ -830,8 +820,7 @@ struct IndexPolicyBase {
};

struct RowViewSentinel {
static constexpr void isRowViewSentinel()
{};
static constexpr void isRowViewSentinel() {};
int64_t const index;
};

Expand Down Expand Up @@ -942,8 +931,7 @@ struct FilteredIndexPolicy : IndexPolicyBase {
};

struct DefaultIndexPolicy : IndexPolicyBase {
static constexpr void isDefaultIndexPolicy()
{};
static constexpr void isDefaultIndexPolicy() {};
/// Needed to be able to copy the policy
DefaultIndexPolicy() = default;
DefaultIndexPolicy(DefaultIndexPolicy&&) = default;
Expand Down Expand Up @@ -1029,8 +1017,7 @@ struct ColumnDataHolder {
template <typename D, typename O, typename IP, typename... C>
struct TableIterator : IP, C... {
public:
static constexpr void isTableIterator()
{};
static constexpr void isTableIterator() {};
using self_t = TableIterator<D, O, IP, C...>;
using policy_t = IP;
using all_columns = framework::pack<C...>;
Expand Down Expand Up @@ -1404,8 +1391,7 @@ namespace o2::framework
{
/// tracks origin in bindingKey matcher to handle the correct arguments
struct PreslicePolicyBase {
static constexpr void isPreslicePolicy()
{};
static constexpr void isPreslicePolicy() {};
const std::string binding;
Entry bindingKey;

Expand Down Expand Up @@ -1434,8 +1420,7 @@ struct PreslicePolicyGeneral : public PreslicePolicyBase {

template <soa::is_table T, is_preslice_policy Policy, bool OPT = false>
struct PresliceBase : public Policy {
static constexpr void isPresliceContainer()
{};
static constexpr void isPresliceContainer() {};
constexpr static bool optional = OPT;
using target_t = T;
using policy_t = Policy;
Expand Down Expand Up @@ -1489,8 +1474,7 @@ using PresliceOptional = PresliceBase<T, PreslicePolicySorted, true>;
///
/// preslices.perCol;
struct PresliceGroup {
static constexpr void isPresliceGroup()
{};
static constexpr void isPresliceGroup() {};
};
} // namespace o2::framework

Expand Down Expand Up @@ -1716,8 +1700,7 @@ template <aod::is_aod_hash L, aod::is_aod_hash D, aod::is_origin_hash O, typenam
class Table
{
public:
static constexpr void isSOATable()
{};
static constexpr void isSOATable() {};
static constexpr const auto ref = TableRef{L::hash, D::hash, O::hash, o2::aod::version(D::str)};
using self_t = Table<L, D, O, Ts...>;
using table_t = self_t;
Expand Down Expand Up @@ -3329,8 +3312,7 @@ namespace o2::soa
{
template <typename... Ts>
struct Join : Table<o2::aod::Hash<"JOIN"_h>, o2::aod::Hash<"JOIN/0"_h>, o2::aod::Hash<"JOIN"_h>, Ts...> {
static constexpr void isJoin()
{};
static constexpr void isJoin() {};
using base = Table<o2::aod::Hash<"JOIN"_h>, o2::aod::Hash<"JOIN/0"_h>, o2::aod::Hash<"JOIN"_h>, Ts...>;

Join(std::shared_ptr<arrow::Table>&& table, uint64_t offset = 0)
Expand Down Expand Up @@ -3484,8 +3466,7 @@ template <soa::is_table T>
class FilteredBase : public T
{
public:
static constexpr void isFilteredBase()
{};
static constexpr void isFilteredBase() {};
using self_t = FilteredBase<T>;
using table_t = typename T::table_t;
using T::originals;
Expand Down Expand Up @@ -4097,8 +4078,7 @@ class Filtered<Filtered<T>> : public FilteredBase<typename T::table_t>
/// First index will be used by process() as the grouping
template <typename L, typename D, typename O, typename Key, typename H, typename... Ts>
struct IndexTable : Table<L, D, O> {
static constexpr void isIndexTable()
{};
static constexpr void isIndexTable() {};
using self_t = IndexTable<L, D, O, Key, H, Ts...>;
using base_t = Table<L, D, O>;
using table_t = base_t;
Expand Down Expand Up @@ -4144,8 +4124,7 @@ struct IndexTable : Table<L, D, O> {

template <typename T, bool APPLY>
struct SmallGroupsBase : public Filtered<T> {
static constexpr void isSmallGroups()
{};
static constexpr void isSmallGroups() {};
static constexpr bool applyFilters = APPLY;
SmallGroupsBase(std::vector<std::shared_ptr<arrow::Table>>&& tables, gandiva::Selection const& selection, uint64_t offset = 0)
: Filtered<T>(std::move(tables), selection, offset) {}
Expand Down
3 changes: 1 addition & 2 deletions Framework/Core/include/Framework/AnalysisHelpers.h
Original file line number Diff line number Diff line change
Expand Up @@ -645,8 +645,7 @@ struct Produces : WritingCursor<T> {
///
/// Notice the label MySetOfProduces is just a mnemonic and can be omitted.
struct ProducesGroup {
static constexpr void isProducesGroup()
{};
static constexpr void isProducesGroup() {};
};

/// Helper template for table transformations
Expand Down
11 changes: 4 additions & 7 deletions Framework/Core/include/Framework/Concepts.h
Original file line number Diff line number Diff line change
Expand Up @@ -46,18 +46,16 @@ concept is_persistent_column = requires(C c) { c.isIteratableColumn(); };

/// 2. require self-index column
template <typename C>
concept is_self_index_column = requires(C c)
{
concept is_self_index_column = requires(C c) {
typename C::compatible_signature;
//requires aod::is_aod_hash<typename C::compatible_signature>;
// requires aod::is_aod_hash<typename C::compatible_signature>;
typename C::self_index_t;
requires std::same_as<typename C::self_index_t, std::true_type>;
};

/// 3. require bindable index column
template <typename C>
concept is_index_column = requires(C c)
{
concept is_index_column = requires(C c) {
typename C::binding_t;
requires not_void<typename C::binding_t>;
};
Expand Down Expand Up @@ -138,8 +136,7 @@ concept is_table_or_iterator = is_table<T> || is_iterator<T>;

/// 10. require soa::IndexTable
template <typename T>
concept is_index_table = requires(T t)
{
concept is_index_table = requires(T t) {
t.isIndexTable();
};

Expand Down