Skip to content

Commit

Permalink
Merge pull request #29888 from fwyzard/Apply_clang-format_Heterogeneo…
Browse files Browse the repository at this point in the history
…usCore

Apply code checks to the HeterogeneousCore packages
  • Loading branch information
cmsbuild committed May 18, 2020
2 parents edbe589 + d805410 commit d2fe90a
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 8 deletions.
2 changes: 1 addition & 1 deletion HeterogeneousCore/SonicCore/interface/SonicClientAsync.h
Expand Up @@ -10,7 +10,7 @@ template <typename InputT, typename OutputT = InputT>
class SonicClientAsync : public SonicClientBase, public SonicClientTypes<InputT, OutputT> {
public:
//main operation
void dispatch(edm::WaitingTaskWithArenaHolder holder) override final {
void dispatch(edm::WaitingTaskWithArenaHolder holder) final {
holder_ = std::move(holder);
setStartTime();
evaluate();
Expand Down
Expand Up @@ -33,7 +33,7 @@ class SonicClientPseudoAsync : public SonicClientBase, public SonicClientTypes<I
}
}
//accessor
void dispatch(edm::WaitingTaskWithArenaHolder holder) override final {
void dispatch(edm::WaitingTaskWithArenaHolder holder) final {
//do all read/writes inside lock to ensure cache synchronization
{
std::lock_guard<std::mutex> guard(mutex_);
Expand Down
2 changes: 1 addition & 1 deletion HeterogeneousCore/SonicCore/interface/SonicClientSync.h
Expand Up @@ -12,7 +12,7 @@ template <typename InputT, typename OutputT = InputT>
class SonicClientSync : public SonicClientBase, public SonicClientTypes<InputT, OutputT> {
public:
//main operation
void dispatch(edm::WaitingTaskWithArenaHolder holder) override final {
void dispatch(edm::WaitingTaskWithArenaHolder holder) final {
holder_ = std::move(holder);
setStartTime();

Expand Down
8 changes: 3 additions & 5 deletions HeterogeneousCore/SonicCore/interface/SonicEDProducer.h
Expand Up @@ -22,13 +22,11 @@ class SonicEDProducer : public edm::stream::EDProducer<edm::ExternalWork, Capabi
//constructor
SonicEDProducer(edm::ParameterSet const& cfg) : client_(cfg.getParameter<edm::ParameterSet>("Client")) {}
//destructor
virtual ~SonicEDProducer() = default;
~SonicEDProducer() override = default;

//derived classes use a dedicated acquire() interface that incorporates client_.input()
//(no need to interact with callback holder)
void acquire(edm::Event const& iEvent,
edm::EventSetup const& iSetup,
edm::WaitingTaskWithArenaHolder holder) override final {
void acquire(edm::Event const& iEvent, edm::EventSetup const& iSetup, edm::WaitingTaskWithArenaHolder holder) final {
auto t0 = std::chrono::high_resolution_clock::now();
acquire(iEvent, iSetup, client_.input());
auto t1 = std::chrono::high_resolution_clock::now();
Expand All @@ -39,7 +37,7 @@ class SonicEDProducer : public edm::stream::EDProducer<edm::ExternalWork, Capabi
}
virtual void acquire(edm::Event const& iEvent, edm::EventSetup const& iSetup, Input& iInput) = 0;
//derived classes use a dedicated produce() interface that incorporates client_.output()
void produce(edm::Event& iEvent, edm::EventSetup const& iSetup) override final {
void produce(edm::Event& iEvent, edm::EventSetup const& iSetup) final {
//todo: measure time between acquire and produce
produce(iEvent, iSetup, client_.output());
}
Expand Down

0 comments on commit d2fe90a

Please sign in to comment.