Parameters
Parameters
Section titled “Parameters”#include <xalgospp/parameters.hh>template<typename Derived>struct ParametersDefined in src/lib/xalgospp/parameters.hh:171
A base Parameters struct with generic setting and getting routines.
The Parameters object provides a device-safe key/value mapping with ergonomic lookup and retrieval based on string keys. Algorithms define their specific Parameters with the key/values needed to properly configure the analysis.
Template Parameters
Section titled “Template Parameters”DerivedCRTP subclass.
List of all members
Section titled “List of all members”| Name | Kind | Owner |
|---|---|---|
set |
function |
Declared here |
get |
function |
Declared here |
set_impl |
function |
Declared here |
get_impl |
function |
Declared here |
Public Methods
Section titled “Public Methods”| Return | Name | Description |
|---|---|---|
XALG_HD bool |
set inline |
Set a parameter for the Parameters-set by string. |
XALG_HD T |
get const inline |
Retrieve a parameter by name from the Parameters-set. |
inline
template<typename T> inline XALG_HD bool set(const char * name, const T & val)Defined in src/lib/xalgospp/parameters.hh:180
Set a parameter for the Parameters-set by string.
Parameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
name |
const char * |
The name for the parameter. |
val |
const T & |
The value for the parameter. |
const inline
template<typename T> inline XALG_HD T get(const char * name, const T & default_val = T{}) constDefined in src/lib/xalgospp/parameters.hh:200
Retrieve a parameter by name from the Parameters-set.
Returns
Section titled “Returns”The requested parameter if present, otherwise the default_val.
Parameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
name |
const char * |
The name of the parameter to retrieve. |
default_val |
const T & |
A default value to return as a fallback. |
Private Static Methods
Section titled “Private Static Methods”| Return | Name | Description |
|---|---|---|
XALG_HD bool |
set_impl static inline |
|
XALG_HD void |
get_impl static inline |
set_impl
Section titled “set_impl”static inline
template<typename Class, typename Tuple, typename T, hd_std::size_t... Is> static inline XALG_HD bool set_impl(Class & obj, const Tuple & t, const char * name, const T & val, hd_std::index_sequence< Is... >)Defined in src/lib/xalgospp/parameters.hh:216
get_impl
Section titled “get_impl”static inline
template<typename Class, typename Tuple, typename T, hd_std::size_t... Is> static inline XALG_HD void get_impl(const Class & obj, const Tuple & t, const char * name, T & out_val, hd_std::index_sequence< Is... >)Defined in src/lib/xalgospp/parameters.hh:240