Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F1494424
Decimation.h
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Size
2 KB
Referenced Files
None
Subscribers
None
Decimation.h
View Options
//===-- app/executionpolicies/Decimation.h -------------------*- C++ -*-===//
//
// The RoSA Framework
//
// Distributed under the terms and conditions of the Boost Software License 1.0.
// See accompanying file LICENSE.
//
// If you did not receive a copy of the license file, see
// http://www.boost.org/LICENSE_1_0.txt.
//
//===----------------------------------------------------------------------===//
///
/// \file app/executionpolicies/Decimation.h
///
/// \author David Juhasz (david.juhasz@tuwien.ac.at)
///
/// \date 2019-2020
///
/// \brief Declaration of the *execution policy* *decimation*.
///
//===----------------------------------------------------------------------===//
#ifndef ROSA_LIB_APP_EXECUTIONPOLICIES_DECIMATION_H
#define ROSA_LIB_APP_EXECUTIONPOLICIES_DECIMATION_H
#include
"rosa/app/AppExecutionPolicy.h"
namespace
rosa
{
namespace
app
{
/// Implementation of the *execution policy* *decimation*.
///
/// \see \c rosa::app::AppExecutionPolicy::decimation()
class
Decimation
:
public
AppExecutionPolicy
{
/// The rate of *decimation*.
const
size_t
Rate
;
/// Counter of triggerings.
size_t
Cycle
;
public
:
/// Constructor.
///
/// \param D the rate of *decimation*
Decimation
(
const
size_t
D
);
/// Tells if \p this object can handle the application *unit* referred by \p
/// H.
///
/// *Decimation* can handle any *units*.
///
/// \param H reference to the *unit* to check
/// \param S the system owning the *unit* referred by \p H
///
/// \return if \p this object can handle the *unit* referred by \p H
bool
canHandle
(
const
AgentHandle
H
,
const
AppSystem
&
S
)
const
noexcept
override
;
/// Tells if processing function should be executed on the current triggering.
///
/// *Decimation* allows execution on each \c rosa::app::Decimation::Rate
/// <sup>th</sup> triggering (i.e., calling of the function), which is counted
/// by \p this object in \c rosa::app::Decimation::Cycle.
///
/// \param InputChanged *ignored*
///
/// \return if to execute processing function
bool
shouldProcess
(
const
std
::
vector
<
bool
>
&
InputChanged
)
noexcept
override
;
/// Dumps \p this object into textual representation.
///
/// \return textual representation of \p this object
std
::
string
dump
(
void
)
const
noexcept
override
;
};
}
// End namespace app
}
// End namespace rosa
#endif
// ROSA_LIB_APP_EXECUTIONPOLICIES_DECIMATION_H
File Metadata
Details
Attached
Mime Type
text/x-c++
Expires
Sun, Mar 1, 6:43 PM (21 h, 56 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
280794
Default Alt Text
Decimation.h (2 KB)
Attached To
Mode
R20 SoC_Rosa_repo
Attached
Detach File
Event Timeline
Log In to Comment