timemory 3.3.0
Modular C++ Toolkit for Performance Analysis and Logging. Profiling API and Tools for C, C++, CUDA, Fortran, and Python. The C++ template API is essentially a framework to creating tools: it is designed to provide a unifying interface for recording various performance measurements alongside data logging and interfaces to other tools.
|
Implements a specific setting. More...
#include "timemory/settings/tsettings.hpp"
Public Types | |
using | type = Tp |
using | value_type = Vp |
using | base_type = vsettings |
using | parser_t = base_type::parser_t |
using | parser_func_t = base_type::parser_func_t |
using | vpointer_t = std::shared_ptr< vsettings > |
using | display_map_t = std::map< std::string, std::string > |
Public Member Functions | |
template<typename Up = Vp, enable_if_t<!std::is_reference< Up >::value > = 0> | |
tsettings () | |
template<typename... Args> | |
tsettings (Vp, Args &&...) | |
template<typename... Args> | |
tsettings (noparse, Vp, Args &&...) | |
~tsettings () override=default | |
tsettings (const tsettings &)=default | |
tsettings (tsettings &&) noexcept=default | |
tsettings & | operator= (const tsettings &)=default |
tsettings & | operator= (tsettings &&) noexcept=default |
Tp & | get () |
const Tp & | get () const |
Tp | get_value (const std::string &val) const |
std::string | as_string () const override |
void | set (Tp) |
void | reset () final |
void | parse () final |
void | parse (const std::string &v) final |
void | clone (std::shared_ptr< vsettings > rhs) final |
void | add_argument (argparse::argument_parser &p) final |
vpointer_t | clone () final |
parser_func_t | get_action (TIMEMORY_API) override |
display_map_t | get_display (std::ios::fmtflags fmt={}, int _w=-1, int _p=-1) override |
template<typename Archive , typename Up = Vp> | |
void | save (Archive &ar, const unsigned int, enable_if_t<!std::is_reference< Up >::value, int >=0) const |
template<typename Archive > | |
void | load (Archive &ar, const unsigned int) |
template<typename... Args> | |
tsettings (Vp _value, Args &&... _args) | |
template<typename... Args> | |
tsettings (noparse, Vp _value, Args &&... _args) | |
const auto & | get_name () const |
const auto & | get_env_name () const |
const auto & | get_description () const |
const auto & | get_command_line () const |
const auto & | get_choices () const |
const auto & | get_count () const |
const auto & | get_max_count () const |
void | set_count (int32_t v) |
void | set_max_count (int32_t v) |
void | set_choices (const std::vector< std::string > &v) |
void | set_command_line (const std::vector< std::string > &v) |
auto | get_type_index () const |
auto | get_value_index () const |
virtual bool | matches (const std::string &, bool exact=true) const |
template<typename Tp > | |
bool | get (Tp &_val) const |
template<typename Tp , enable_if_t< std::is_fundamental< decay_t< Tp > >::value > = 0> | |
bool | set (const Tp &_val) |
void | set (const std::string &_val) |
Static Public Member Functions | |
template<typename Tp > | |
static auto | cast (std::shared_ptr< vsettings > &_val) |
template<typename Tp > | |
static auto | cast (const std::shared_ptr< vsettings > &_val) |
Protected Member Functions | |
template<typename Tp > | |
void | report_change (Tp _old, const Tp &_new) |
Static Protected Member Functions | |
static int | get_debug () |
Protected Attributes | |
std::type_index | m_value_index = std::type_index(typeid(void)) |
std::vector< std::string > | m_cmdline = {} |
std::vector< std::string > | m_choices = {} |
Implements a specific setting.
Definition at line 55 of file tsettings.hpp.
using tim::tsettings< Tp, Vp >::base_type = vsettings |
Definition at line 79 of file tsettings.hpp.
|
inherited |
Definition at line 59 of file vsettings.hpp.
using tim::tsettings< Tp, Vp >::parser_func_t = base_type::parser_func_t |
Definition at line 81 of file tsettings.hpp.
using tim::tsettings< Tp, Vp >::parser_t = base_type::parser_t |
Definition at line 80 of file tsettings.hpp.
using tim::tsettings< Tp, Vp >::type = Tp |
Definition at line 77 of file tsettings.hpp.
using tim::tsettings< Tp, Vp >::value_type = Vp |
Definition at line 78 of file tsettings.hpp.
using tim::tsettings< Tp, Vp >::vpointer_t = std::shared_ptr<vsettings> |
Definition at line 82 of file tsettings.hpp.
tim::tsettings< Tp, Vp >::tsettings |
tim::tsettings< Tp, Vp >::tsettings | ( | Vp | , |
Args && | ... | ||
) |
tim::tsettings< Tp, Vp >::tsettings | ( | noparse | , |
Vp | , | ||
Args && | ... | ||
) |
|
overridedefault |
|
default |
|
defaultnoexcept |
tim::tsettings< Tp, Vp >::tsettings | ( | Vp | _value, |
Args &&... | _args | ||
) |
Definition at line 176 of file tsettings.hpp.
References tim::vsettings::m_value_index, and tim::tsettings< Tp, Vp >::parse().
tim::tsettings< Tp, Vp >::tsettings | ( | noparse | , |
Vp | _value, | ||
Args &&... | _args | ||
) |
|
finalvirtual |
Implements tim::vsettings.
Definition at line 265 of file tsettings.hpp.
References tim::argparse::argument_parser::argument::action(), tim::argparse::argument_parser::add_argument(), tim::argparse::argument_parser::argument::choices(), tim::argparse::argument_parser::argument::count(), tim::argparse::argument_parser::argument::max_count(), and TIMEMORY_API.
|
overridevirtual |
Implements tim::vsettings.
Definition at line 229 of file tsettings.hpp.
|
inlinestaticinherited |
Definition at line 125 of file vsettings.hpp.
|
inlinestaticinherited |
Definition at line 119 of file vsettings.hpp.
|
finalvirtual |
|
finalvirtual |
Reimplemented from tim::vsettings.
Definition at line 281 of file tsettings.hpp.
References tim::vsettings::clone(), and tim::tsettings< Tp, Vp >::get().
Tp & tim::tsettings< Tp, Vp >::get |
Definition at line 199 of file tsettings.hpp.
Referenced by tim::tsettings< Tp, Vp >::clone(), tim::vsettings::get(), and tim::settings::get().
const Tp & tim::tsettings< Tp, Vp >::get |
Definition at line 206 of file tsettings.hpp.
|
inherited |
Definition at line 172 of file vsettings.hpp.
|
overridevirtual |
Implements tim::vsettings.
Definition at line 307 of file tsettings.hpp.
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlinestaticprotectedinherited |
Definition at line 131 of file vsettings.hpp.
References tim::get_env().
Referenced by tim::vsettings::report_change().
|
inlineinherited |
|
overridevirtual |
Reimplemented from tim::vsettings.
Definition at line 314 of file tsettings.hpp.
References tim::vsettings::get_display().
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
Tp tim::tsettings< Tp, Vp >::get_value | ( | const std::string & | val | ) | const |
Definition at line 213 of file tsettings.hpp.
|
inlineinherited |
void tim::tsettings< Tp, Vp >::load | ( | Archive & | ar, |
const unsigned int | |||
) |
Definition at line 354 of file tsettings.hpp.
|
virtualinherited |
|
default |
|
defaultnoexcept |
|
finalvirtual |
Implements tim::vsettings.
Definition at line 246 of file tsettings.hpp.
Referenced by tim::tsettings< Tp, Vp >::tsettings().
|
finalvirtual |
|
protectedinherited |
Definition at line 203 of file vsettings.hpp.
References tim::vsettings::get_debug(), tim::vsettings::m_env_name, and tim::vsettings::m_name.
|
finalvirtual |
void tim::tsettings< Tp, Vp >::save | ( | Archive & | ar, |
const unsigned int | , | ||
enable_if_t<!std::is_reference< Up >::value, int > | = 0 |
||
) | const |
Definition at line 335 of file tsettings.hpp.
|
inlineinherited |
Definition at line 114 of file vsettings.hpp.
References tim::vsettings::parse().
|
inherited |
void tim::tsettings< Tp, Vp >::set | ( | Tp | _value | ) |
Definition at line 220 of file tsettings.hpp.
Referenced by tim::vsettings::set(), and tim::settings::set().
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
protectedinherited |
Definition at line 150 of file vsettings.hpp.
Referenced by tim::vsettings::get_choices(), tim::vsettings::set_choices(), and tim::TIMEMORY_SETTINGS_LINKAGE().
|
protectedinherited |
Definition at line 149 of file vsettings.hpp.
Referenced by tim::vsettings::get_command_line(), tim::vsettings::set_command_line(), and tim::TIMEMORY_SETTINGS_LINKAGE().
|
protectedinherited |
Definition at line 143 of file vsettings.hpp.
Referenced by tim::tsettings< Tp, Vp >::tsettings(), and tim::vsettings::get_value_index().