Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Please consider the following formatting changes to #13679 #63

Merged
merged 1 commit into from
Nov 12, 2024
Merged
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
17 changes: 11 additions & 6 deletions Framework/Core/include/Framework/ASoA.h
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,8 @@

#define DECLARE_SOA_ITERATOR_METADATA() \
template <typename IT> \
requires(o2::soa::is_iterator<IT>) struct MetadataTrait<IT> { \
requires(o2::soa::is_iterator<IT>) \
struct MetadataTrait<IT> { \
using metadata = typename MetadataTrait<typename IT::parent_t>::metadata; \
};

Expand Down Expand Up @@ -1048,11 +1049,15 @@ struct RowViewCore : public IP, C... {
void bind()
{
using namespace o2::soa;
auto f = framework::overloaded {
[this]<typename T>(T*) -> void requires is_persistent_column<T> { T::mColumnIterator.mCurrentPos = &this->mRowIndex; },
[this]<typename T>(T*) -> void requires is_dynamic_column<T> { bindDynamicColumn<T>(typename T::bindings_t{});},
auto f = framework::overloaded{
[this]<typename T>(T*) -> void
requires is_persistent_column<T>
{ T::mColumnIterator.mCurrentPos = &this->mRowIndex; },
[this]<typename T>(T*) -> void
requires is_dynamic_column<T>
{ bindDynamicColumn<T>(typename T::bindings_t{}); },
[this]<typename T>(T*) -> void {},
};
};
(f(static_cast<C*>(nullptr)), ...);
if constexpr (has_index_v) {
this->setIndices(this->getIndices());
Expand Down Expand Up @@ -1134,7 +1139,7 @@ template <typename T>
concept is_index_table = soa::is_specialization_origin_v<T, o2::soa::IndexTable>;

template <soa::is_table T>
requires (!soa::is_index_table<T>)
requires(!soa::is_index_table<T>)
static constexpr std::string getLabelFromType()
{
if constexpr (soa::is_type_with_originals_v<std::decay_t<T>>) {
Expand Down
2 changes: 1 addition & 1 deletion Framework/Core/include/Framework/AnalysisHelpers.h
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ struct WritingCursor<soa::Table<ORIGIN, PC...>> {
template <typename T>
static decltype(auto) extract(T const& arg)
{
if constexpr (requires (T t) { t.globalIndex(); }) {
if constexpr (requires(T t) { t.globalIndex(); }) {
return arg.globalIndex();
} else {
static_assert(!framework::has_type<T>(framework::pack<PC...>{}), "Argument type mismatch");
Expand Down
6 changes: 4 additions & 2 deletions Framework/Core/include/Framework/AnalysisTask.h
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,8 @@ struct AnalysisDataProcessorBuilder {
}

template <typename O>
static void addOriginal(const char* name, bool value, std::vector<InputSpec>& inputs) requires soa::has_metadata<aod::MetadataTrait<std::decay_t<O>>>
static void addOriginal(const char* name, bool value, std::vector<InputSpec>& inputs)
requires soa::has_metadata<aod::MetadataTrait<std::decay_t<O>>>
{
using metadata = typename aod::MetadataTrait<std::decay_t<O>>::metadata;
std::vector<ConfigParamSpec> inputMetadata;
Expand Down Expand Up @@ -176,7 +177,8 @@ struct AnalysisDataProcessorBuilder {
}

template <typename T>
static auto extractTableFromRecord(InputRecord& record) requires soa::has_metadata<aod::MetadataTrait<T>>
static auto extractTableFromRecord(InputRecord& record)
requires soa::has_metadata<aod::MetadataTrait<T>>
{
auto table = record.get<TableConsumer>(aod::MetadataTrait<T>::metadata::tableLabel())->asArrowTable();
if (table->num_rows() == 0) {
Expand Down
Loading