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

Apply code checks to the HeterogeneousCore packages #29888

Merged
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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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