HEBench
hebench::cpp::WorkloadParams::MatrixMultiply Class Reference

#include <workload_params.hpp>

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

Public Types

enum  : std::size_t { Index_RowsM0 , Index_ColsM0 , Index_ColsM1 , MinRequiredParameters }
 

Public Member Functions

std::uint64_t rows_M0 () const
 Number of rows in matrix M0. More...
 
std::uint64_t & rows_M0 ()
 Number of rows in matrix M0. More...
 
std::uint64_t cols_M0 () const
 Number of columns in matrix M0 and rows in matrix M1. More...
 
std::uint64_t & cols_M0 ()
 Number of columns in matrix M0 and rows in matrix M1. More...
 
std::uint64_t cols_M1 () const
 Number of columns in matrix M1. More...
 
std::uint64_t & cols_M1 ()
 Number of columns in matrix M1. More...
 
 MatrixMultiply (std::uint64_t _rows_M0=0, std::uint64_t _cols_M0=0, std::uint64_t _cols_M1=0)
 Initializes a new object to represent workload parameters for matrix multiplication workload. More...
 
 MatrixMultiply (const std::vector< hebench::APIBridge::WorkloadParam > &w_params)
 Initializes workload parameters for matrix multiplication from a list of existing workload parameters. More...
 
 MatrixMultiply (const hebench::APIBridge::WorkloadParams &w_params)
 Initializes workload parameters for matrix multiplication 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 211 of file workload_params.hpp.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum : std::size_t
Enumerator
Index_RowsM0 
Index_ColsM0 
Index_ColsM1 
MinRequiredParameters 

Definition at line 214 of file workload_params.hpp.

Constructor & Destructor Documentation

◆ MatrixMultiply() [1/3]

hebench::cpp::WorkloadParams::MatrixMultiply::MatrixMultiply ( std::uint64_t  _rows_M0 = 0,
std::uint64_t  _cols_M0 = 0,
std::uint64_t  _cols_M1 = 0 
)
inline

Initializes a new object to represent workload parameters for matrix multiplication workload.

Parameters
[in]_rows_M0Number of rows in matrix M0.
[in]_cols_M0Number of columns in matrix M0 and rows in matrix M1.
[in]_cols_M1Number of columns in matrix M1.

Definition at line 255 of file workload_params.hpp.

◆ MatrixMultiply() [2/3]

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

Initializes workload parameters for matrix multiplication 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, 3 parameters.
std::logic_errorif the type of any of the required parameters is incorrect.

Matrix multiplication workload requires, at least, 3 parameters as specified by its definition. If any of the parameters is missing or in the wrong format, a std::exception or derived type is thrown.

Definition at line 275 of file workload_params.hpp.

◆ MatrixMultiply() [3/3]

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

Initializes workload parameters for matrix multiplication 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, 3 parameters.
std::logic_errorif the type of any of the required parameters is incorrect.

Matrix multiplication workload requires, at least, 3 parameters as specified by its definition. If any of the parameters is missing or in the wrong format, a std::exception or derived type is thrown.

Definition at line 292 of file workload_params.hpp.

Member Function Documentation

◆ cols_M0() [1/2]

std::uint64_t& hebench::cpp::WorkloadParams::MatrixMultiply::cols_M0 ( )
inline

Number of columns in matrix M0 and rows in matrix M1.

Definition at line 237 of file workload_params.hpp.

◆ cols_M0() [2/2]

std::uint64_t hebench::cpp::WorkloadParams::MatrixMultiply::cols_M0 ( ) const
inline

Number of columns in matrix M0 and rows in matrix M1.

Definition at line 233 of file workload_params.hpp.

◆ cols_M1() [1/2]

std::uint64_t& hebench::cpp::WorkloadParams::MatrixMultiply::cols_M1 ( )
inline

Number of columns in matrix M1.

Definition at line 245 of file workload_params.hpp.

◆ cols_M1() [2/2]

std::uint64_t hebench::cpp::WorkloadParams::MatrixMultiply::cols_M1 ( ) const
inline

Number of columns in matrix M1.

Definition at line 241 of file workload_params.hpp.

◆ rows_M0() [1/2]

std::uint64_t& hebench::cpp::WorkloadParams::MatrixMultiply::rows_M0 ( )
inline

Number of rows in matrix M0.

Definition at line 229 of file workload_params.hpp.

◆ rows_M0() [2/2]

std::uint64_t hebench::cpp::WorkloadParams::MatrixMultiply::rows_M0 ( ) const
inline

Number of rows in matrix M0.

Definition at line 225 of file workload_params.hpp.


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