#include <ParameterPair.h>
Public Member Functions | |
| ParameterPair () | |
| ParameterPair (const std::string &name, const ParameterValue &value, const bool isCompilerParameter=false) | |
| void | SetValue (const ParameterValue &value) |
| const std::string & | GetName () const |
| std::string | GetString () const |
| std::string | GetValueString () const |
| const ParameterValue & | GetValue () const |
| uint64_t | GetValueUint () const |
| ParameterValueType | GetValueType () const |
| bool | IsCompilerParameter () const |
| bool | HasSameValue (const ParameterPair &other) const |
Static Public Member Functions | |
| static ParameterValueType | GetTypeFromValue (const ParameterValue &value) |
| template<typename T > | |
| static T | GetParameterValue (const std::vector< ParameterPair > &pairs, const std::string &name) |
| template<typename T > | |
| static std::vector< T > | GetParameterValues (const std::vector< ParameterPair > &pairs, const std::vector< std::string > &names) |
Class which holds single value for one kernel parameter.
| ktt::ParameterPair::ParameterPair | ( | ) |
Constructor which creates an empty parameter pair.
|
explicit |
Constructor which creates a parameter pair with the specified value.
| name | Name of a kernel parameter tied to the pair. |
| value | Value of a parameter. |
| isCompilerParameter | If true, this paramater is a compiler option rather than in the program prefix. |
| const std::string & ktt::ParameterPair::GetName | ( | ) | const |
Returns name of a parameter.
|
static |
Returns value of the specified parameter from parameter pairs.
| pairs | Pairs which will be searched for the specified parameter. |
| name | Parameter whose value will be returned. |
|
static |
Returns value of all the specified parameters from parameter pairs.
| pairs | Pairs which will be searched for the specified parameters. |
| names | Parameters whose values will be returned. |
| std::string ktt::ParameterPair::GetString | ( | ) | const |
Converts parameter pair to string.
|
static |
Returns type of the specified parameter value.
| const ParameterValue & ktt::ParameterPair::GetValue | ( | ) | const |
Returns parameter pair value.
| std::string ktt::ParameterPair::GetValueString | ( | ) | const |
Converts parameter value to string.
| ParameterValueType ktt::ParameterPair::GetValueType | ( | ) | const |
Returns type of the parameter pair value.
| uint64_t ktt::ParameterPair::GetValueUint | ( | ) | const |
Returns unsigned integer representation of parameter pair value.
| bool ktt::ParameterPair::HasSameValue | ( | const ParameterPair & | other | ) | const |
Checks if parameter value is same as other parameter value.
| other | Source for other value. |
| bool ktt::ParameterPair::IsCompilerParameter | ( | ) | const |
Returns whether this parameter is a compiler parameter
| void ktt::ParameterPair::SetValue | ( | const ParameterValue & | value | ) |
Setter for parameter value.
| value | New value of a parameter. |