HEBench
hebench::cpp::WorkloadParams::VectorSize Class Reference

#include <workload_params.hpp>

Inheritance diagram for hebench::cpp::WorkloadParams::VectorSize:
Collaboration diagram for hebench::cpp::WorkloadParams::VectorSize:

Public Types

enum  : std::size_t { Index_N , MinRequiredParameters }
 

Public Member Functions

std::uint64_t n () const
 Number elements in a vector. More...
 
std::uint64_t & n ()
 Number elements in a vector. More...
 
 VectorSize (std::uint64_t _n=0)
 Initializes a new object to represent workload parameters for a workload requiring a vector size. More...
 
 VectorSize (const std::vector< hebench::APIBridge::WorkloadParam > &w_params)
 Initializes workload parameters for a workload requiring a vector size from a list of existing workload parameters. More...
 
 VectorSize (const hebench::APIBridge::WorkloadParams &w_params)
 Initializes workload parameters for a workload requiring a vector size from a list of existing workload parameters. More...
 
- Public Member Functions inherited from hebench::cpp::WorkloadParams::Common
 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
 

Additional Inherited Members

- Protected Attributes inherited from hebench::cpp::WorkloadParams::Common
std::vector< hebench::APIBridge::WorkloadParamm_w_params
 

Detailed Description

Definition at line 309 of file workload_params.hpp.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum : std::size_t
Enumerator
Index_N 
MinRequiredParameters 

Definition at line 312 of file workload_params.hpp.

Constructor & Destructor Documentation

◆ VectorSize() [1/3]

hebench::cpp::WorkloadParams::VectorSize::VectorSize ( std::uint64_t  _n = 0)
inline

Initializes a new object to represent workload parameters for a workload requiring a vector size.

Parameters
[in]_nNumber elements in a vector.

Definition at line 333 of file workload_params.hpp.

◆ VectorSize() [2/3]

hebench::cpp::WorkloadParams::VectorSize::VectorSize ( const std::vector< hebench::APIBridge::WorkloadParam > &  w_params)
inline

Initializes workload parameters for a workload requiring a vector size from a list of existing workload parameters.

Parameters
[in]w_paramsWorkload parameters from which to initialize. These will be copied to internal representation.
Exceptions
std::out_of_rangeif w_params does not have, at least, 1 parameter.
std::logic_errorif the type of any of the required parameters is incorrect.

Workloads of this type require, at least, 1 parameter as specified by their definition. If any of the parameters is missing or in the wrong format, a std::exception or derived type is thrown.

Definition at line 351 of file workload_params.hpp.

◆ VectorSize() [3/3]

hebench::cpp::WorkloadParams::VectorSize::VectorSize ( const hebench::APIBridge::WorkloadParams w_params)
inline

Initializes workload parameters for a workload requiring a vector size from a list of existing workload parameters.

Parameters
[in]w_paramsWorkload parameters from which to initialize. These will be copied to internal representation.
Exceptions
std::out_of_rangeif w_params does not have, at least, 1 parameter.
std::logic_errorif the type of any of the required parameters is incorrect.

Workloads of this type require, at least, 1 parameter as specified by their definition. If any of the parameters is missing or in the wrong format, a std::exception or derived type is thrown.

Definition at line 369 of file workload_params.hpp.

Member Function Documentation

◆ n() [1/2]

std::uint64_t& hebench::cpp::WorkloadParams::VectorSize::n ( )
inline

Number elements in a vector.

Definition at line 325 of file workload_params.hpp.

◆ n() [2/2]

std::uint64_t hebench::cpp::WorkloadParams::VectorSize::n ( ) const
inline

Number elements in a vector.

Definition at line 321 of file workload_params.hpp.


The documentation for this class was generated from the following file: