HEBench
|
Base wrapper around the flexible workload parameters. More...
#include <workload_params.hpp>
Public Member Functions | |
Common (std::size_t num_params=0) | |
Common (const std::vector< hebench::APIBridge::WorkloadParam > &w_params) | |
Common (const hebench::APIBridge::WorkloadParams &w_params) | |
virtual | ~Common ()=default |
template<typename T > | |
void | add (const T &value, const std::string &name=std::string()) |
Adds a new workload parameter to the list. More... | |
template<typename T > | |
void | set (std::size_t index, const T &value, const std::string &name) |
Sets a new value for an existing workload parameter. More... | |
template<typename T > | |
void | set (std::size_t index, const T &value) |
Sets a new value for an existing workload parameter. More... | |
template<typename T > | |
const T & | get (std::size_t index) const |
Retrieves the value for an existing workload parameter. More... | |
const char * | getName (std::size_t index) const |
const std::vector< hebench::APIBridge::WorkloadParam > & | getParams () const |
template<> | |
void | add (const double &value, const std::string &name) |
template<> | |
void | set (std::size_t index, const double &value, const std::string &name) |
template<> | |
void | set (std::size_t index, const double &value) |
template<> | |
const double & | get (std::size_t index) const |
Protected Attributes | |
std::vector< hebench::APIBridge::WorkloadParam > | m_w_params |
Base wrapper around the flexible workload parameters.
This class helps to hide nuisances with workload parameters values and types using templated methods. The templates are defined only for the types supported by the flexible workload parameters.
This class also serves as base class for wrappers for specific workloads. Clients can use this class as is, or use one of the specializations. Note that some specializations may handle nuisances of the workload parameters definition for the workload they represent, so, it is recommended to use the specializations when possible.
Definition at line 31 of file workload_params.hpp.
|
inline |
Definition at line 34 of file workload_params.hpp.
|
inline |
Definition at line 38 of file workload_params.hpp.
|
inline |
Definition at line 42 of file workload_params.hpp.
|
virtualdefault |
|
inline |
Definition at line 172 of file workload_params.hpp.
void hebench::cpp::WorkloadParams::Common::add | ( | const T & | value, |
const std::string & | name = std::string() |
||
) |
Adds a new workload parameter to the list.
[in] | value | Value for the parameter. |
[in] | name | Name for the parameter. |
const T& hebench::cpp::WorkloadParams::Common::get | ( | std::size_t | index | ) | const |
Retrieves the value for an existing workload parameter.
[in] | index | Index for the parameter to retrieve. |
std::out_of_range | if index is out of range. |
|
inline |
Definition at line 202 of file workload_params.hpp.
|
inline |
Definition at line 81 of file workload_params.hpp.
|
inline |
Definition at line 83 of file workload_params.hpp.
|
inline |
Definition at line 193 of file workload_params.hpp.
|
inline |
Definition at line 183 of file workload_params.hpp.
void hebench::cpp::WorkloadParams::Common::set | ( | std::size_t | index, |
const T & | value | ||
) |
Sets a new value for an existing workload parameter.
[in] | index | Index for the parameter to set. |
[in] | value | New value for the parameter. |
std::out_of_range | if index is out of range. |
void hebench::cpp::WorkloadParams::Common::set | ( | std::size_t | index, |
const T & | value, | ||
const std::string & | name | ||
) |
Sets a new value for an existing workload parameter.
[in] | index | Index for the parameter to set. |
[in] | value | New value for the parameter. |
[in] | name | New name for the parameter. |
std::out_of_range | if index is out of range. |
|
protected |
Definition at line 86 of file workload_params.hpp.