Page MenuHomePhorge

Decimation.cpp
No OneTemporary

Size
1 KB
Referenced Files
None
Subscribers
None

Decimation.cpp

//===-- deluxe/executionpolicies/Decimation.cpp -----------------*- C++ -*-===//
//
// The RoSA Framework
//
//===----------------------------------------------------------------------===//
///
/// \file deluxe/executionpolicies/Decimation.cpp
///
/// \author David Juhasz (david.juhasz@tuwien.ac.at)
///
/// \date 2019
///
/// \brief Implementation for deluxe/executionpolicies/Decimation.h.
///
//===----------------------------------------------------------------------===//
#include "Decimation.h"
#include <algorithm>
namespace rosa {
namespace deluxe {
Decimation::Decimation(const size_t D)
: Rate(std::max<size_t>(D, 1)), Cycle(0) {}
bool Decimation::canHandle(const AgentHandle, const DeluxeSystem &) const
noexcept {
return true;
}
bool Decimation::shouldProcess(const std::vector<bool> &) noexcept {
return (Cycle++ % Rate) == 0;
}
std::string Decimation::dump(void) const noexcept {
return "Decimation with rate " + std::to_string(Rate);
}
} // End namespace deluxe
} // End namespace rosa

File Metadata

Mime Type
text/x-c++
Expires
Sun, Mar 1, 6:33 PM (1 d, 20 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
279376
Default Alt Text
Decimation.cpp (1 KB)

Event Timeline