Skip to content

Commit

Permalink
Merge f5f18ff into sapling-pr-archive-ktf
Browse files Browse the repository at this point in the history
  • Loading branch information
ktf authored Nov 24, 2023
2 parents b78f1a5 + f5f18ff commit 31f41f8
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 32 deletions.
8 changes: 4 additions & 4 deletions Framework/Core/include/Framework/ASoA.h
Original file line number Diff line number Diff line change
Expand Up @@ -614,14 +614,14 @@ struct DefaultIndexPolicy : IndexPolicyBase {
this->setCursor(mMaxRow);
}

bool operator!=(DefaultIndexPolicy const& other) const
friend bool operator!=(DefaultIndexPolicy const& lh, DefaultIndexPolicy const& rh)
{
return O2_BUILTIN_LIKELY(this->mRowIndex != other.mRowIndex);
return O2_BUILTIN_LIKELY(lh.mRowIndex != rh.mRowIndex);
}

bool operator==(DefaultIndexPolicy const& other) const
friend bool operator==(DefaultIndexPolicy const& lh, DefaultIndexPolicy const& rh)
{
return O2_BUILTIN_UNLIKELY(this->mRowIndex == other.mRowIndex);
return O2_BUILTIN_UNLIKELY(lh.mRowIndex == rh.mRowIndex);
}

bool operator!=(RowViewSentinel const& sentinel) const
Expand Down
8 changes: 4 additions & 4 deletions Framework/Core/include/Framework/ASoAHelpers.h
Original file line number Diff line number Diff line change
Expand Up @@ -1253,13 +1253,13 @@ struct CombinationsGenerator {
{
return this->mCurrent;
}
bool operator==(const CombinationsIterator& rh)
friend bool operator==(const CombinationsIterator& lh, const CombinationsIterator& rh)
{
return (this->mIsEnd && rh.mIsEnd) || (this->mCurrent == rh.mCurrent);
return (lh.mIsEnd && rh.mIsEnd) || (lh.mCurrent == rh.mCurrent);
}
bool operator!=(const CombinationsIterator& rh)
friend bool operator!=(const CombinationsIterator& lh, const CombinationsIterator& rh)
{
return !(*this == rh);
return !(lh == rh);
}
};

Expand Down
42 changes: 18 additions & 24 deletions Framework/Core/test/test_FrameworkDataFlowToO2Control.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -31,32 +31,26 @@ namespace
{
WorkflowSpec defineDataProcessing()
{
return {{"A", //
Inputs{}, //
Outputs{OutputSpec{"TST", "A1"}, OutputSpec{"TST", "A2"}}, // A1 will be consumed twice, A2 is dangling
AlgorithmSpec{}, //
{ConfigParamSpec{"channel-config", VariantType::String, // raw input channel
"name=into_dpl,type=pull,method=connect,address=ipc:///tmp/pipe-into-dpl,transport=shmem,rateLogging=10,rcvBufSize=789",
{"Out-of-band channel config"}}}},
{"B", // producer, no inputs
Inputs{},
Outputs{OutputSpec{"TST", "B1"}},
return {{.name = "A", //
.outputs = Outputs{OutputSpec{"TST", "A1"}, OutputSpec{"TST", "A2"}}, // A1 will be consumed twice, A2 is dangling
.algorithm = AlgorithmSpec{}, //
.options = {ConfigParamSpec{"channel-config", VariantType::String, // raw input channel
"name=into_dpl,type=pull,method=connect,address=ipc:///tmp/pipe-into-dpl,transport=shmem,rateLogging=10,rcvBufSize=789",
{"Out-of-band channel config"}}}},
{.name = "B", // producer, no inputs
.outputs = Outputs{OutputSpec{"TST", "B1"}},
.metadata = {{ecs::cpuKillThreshold, "3.0"}}},
{"C", // first consumer of A1, consumer of B1
{InputSpec{"y", "TST", "A1"}, InputSpec{"y", "TST", "B1"}},
Outputs{},
{.name = "C", // first consumer of A1, consumer of B1
.inputs = {InputSpec{"y", "TST", "A1"}, InputSpec{"y", "TST", "B1"}},
.metadata = {{ecs::privateMemoryKillThresholdMB, "5000"}}},
{"D", // second consumer of A1
Inputs{
InputSpec{"x", "TST", "A1"}},
Outputs{},
AlgorithmSpec{},
{ConfigParamSpec{"a-param", VariantType::Int, 1, {"A parameter which should not be escaped"}},
ConfigParamSpec{"b-param", VariantType::String, "", {"a parameter which will be escaped"}},
ConfigParamSpec{"c-param", VariantType::String, "foo;bar", {"another parameter which will be escaped"}},
ConfigParamSpec{"channel-config", VariantType::String, // raw output channel
"name=outta_dpl,type=push,method=bind,address=ipc:///tmp/pipe-outta-dpl,transport=shmem,rateLogging=10",
{"Out-of-band channel config"}}}}};
{.name = "D", // second consumer of A1
.inputs = Inputs{InputSpec{"x", "TST", "A1"}},
.options = {ConfigParamSpec{"a-param", VariantType::Int, 1, {"A parameter which should not be escaped"}},
ConfigParamSpec{"b-param", VariantType::String, "", {"a parameter which will be escaped"}},
ConfigParamSpec{"c-param", VariantType::String, "foo;bar", {"another parameter which will be escaped"}},
ConfigParamSpec{"channel-config", VariantType::String, // raw output channel
"name=outta_dpl,type=push,method=bind,address=ipc:///tmp/pipe-outta-dpl,transport=shmem,rateLogging=10",
{"Out-of-band channel config"}}}}};
}

char* strdiffchr(const char* s1, const char* s2)
Expand Down

0 comments on commit 31f41f8

Please sign in to comment.