this data type encodes the options of storage scope. The default is hierarchical (tree) scope. Specification of flat scope overrides the hierarchy scope, e.g. you cannot have a hierarchical flat scope. The timeline scope is meaningless should a specification of tree or flat, thus the valid combinations are: tree, flat, tree + timeline, flat + timeline.
More...
#include "timemory/utility/types.hpp"
|
| config () |
|
| config (const data_type &obj) |
|
| config (data_type &&obj) noexcept |
|
| config (bool _flat) |
|
| config (bool _flat, bool _timeline) |
|
| config (bool _flat, bool _timeline, bool _tree) |
|
| config (tree) |
|
| config (flat) |
|
| config (timeline) |
|
template<typename Arg , typename... Args, std::enable_if_t<(std::is_same< Arg, tree >::value||std::is_same< Arg, flat >::value||std::is_same< Arg, timeline >::value), int > = 0> |
| config (Arg &&arg, Args &&... args) |
|
| ~config ()=default |
|
| config (const config &)=default |
|
| config (config &&) noexcept=default |
|
config & | operator= (const config &)=default |
|
config & | operator= (config &&) noexcept=default |
|
config & | operator= (const data_type &rhs) |
|
config & | operator= (data_type &&rhs) noexcept |
|
template<typename T , std::enable_if_t<(std::is_same< T, tree >::value||std::is_same< T, flat >::value||std::is_same< T, timeline >::value), int > = 0> |
config & | operator+= (T) |
|
template<typename T , std::enable_if_t<(std::is_same< T, tree >::value||std::is_same< T, flat >::value||std::is_same< T, timeline >::value), int > = 0> |
config & | set (bool val=true) |
|
bool | is_flat () const |
|
bool | is_timeline () const |
|
bool | is_tree () const |
|
bool | is_flat_timeline () const |
|
bool | is_tree_timeline () const |
|
template<bool ForceFlatT> |
bool | is_flat () const |
|
template<bool ForceTreeT, bool ForceTimeT> |
bool | is_tree () const |
|
template<typename ForceTreeT = false_type, typename ForceFlatT = false_type, typename ForceTimeT = false_type> |
uint64_t | compute_depth (uint64_t _current) |
|
template<typename ForceTreeT = false_type, typename ForceFlatT = false_type, typename ForceTimeT = false_type> |
uint64_t | compute_hash (uint64_t _id, uint64_t _depth, uint64_t &_counter) |
|
this data type encodes the options of storage scope. The default is hierarchical (tree) scope. Specification of flat scope overrides the hierarchy scope, e.g. you cannot have a hierarchical flat scope. The timeline scope is meaningless should a specification of tree or flat, thus the valid combinations are: tree, flat, tree + timeline, flat + timeline.
Definition at line 445 of file types.hpp.
◆ config() [1/12]
tim::scope::config::config |
( |
| ) |
|
|
inline |
Definition at line 447 of file types.hpp.
std::bitset< scope_count > data_type
◆ config() [2/12]
tim::scope::config::config |
( |
const data_type & |
obj | ) |
|
|
inlineexplicit |
◆ config() [3/12]
tim::scope::config::config |
( |
data_type && |
obj | ) |
|
|
inlineexplicitnoexcept |
◆ config() [4/12]
tim::scope::config::config |
( |
bool |
_flat | ) |
|
|
inlineexplicit |
Definition at line 459 of file types.hpp.
461 make_index_sequence<scope_count>{}))
std::array< bool, scope_count > input_type
◆ config() [5/12]
tim::scope::config::config |
( |
bool |
_flat, |
|
|
bool |
_timeline |
|
) |
| |
|
inlineexplicit |
Definition at line 464 of file types.hpp.
466 make_index_sequence<scope_count>{}))
◆ config() [6/12]
tim::scope::config::config |
( |
bool |
_flat, |
|
|
bool |
_timeline, |
|
|
bool |
_tree |
|
) |
| |
|
inlineexplicit |
Definition at line 469 of file types.hpp.
471 make_index_sequence<scope_count>{}))
◆ config() [7/12]
tim::scope::config::config |
( |
tree |
| ) |
|
|
inline |
◆ config() [8/12]
tim::scope::config::config |
( |
flat |
| ) |
|
|
inline |
◆ config() [9/12]
◆ config() [10/12]
template<typename Arg , typename... Args, std::enable_if_t<(std::is_same< Arg, tree >::value||std::is_same< Arg, flat >::value||std::is_same< Arg, timeline >::value), int > = 0>
tim::scope::config::config |
( |
Arg && |
arg, |
|
|
Args &&... |
args |
|
) |
| |
|
inlineexplicit |
◆ ~config()
tim::scope::config::~config |
( |
| ) |
|
|
default |
◆ config() [11/12]
tim::scope::config::config |
( |
const config & |
| ) |
|
|
default |
◆ config() [12/12]
tim::scope::config::config |
( |
config && |
| ) |
|
|
defaultnoexcept |
◆ compute_depth()
template<typename ForceTreeT = false_type, typename ForceFlatT = false_type, typename ForceTimeT = false_type>
uint64_t tim::scope::config::compute_depth |
( |
uint64_t |
_current | ) |
|
|
inline |
Definition at line 586 of file types.hpp.
588 static_assert(!(ForceTreeT::value && ForceFlatT::value),
589 "Error! Type cannot enforce tree-based call-stack depth storage "
590 "and flat call-stack depth storage simulatenously");
594 if(ForceFlatT::value ||
is_flat())
◆ compute_hash()
template<typename ForceTreeT = false_type, typename ForceFlatT = false_type, typename ForceTimeT = false_type>
uint64_t tim::scope::config::compute_hash |
( |
uint64_t |
_id, |
|
|
uint64_t |
_depth, |
|
|
uint64_t & |
_counter |
|
) |
| |
|
inline |
Definition at line 609 of file types.hpp.
617 if(is_tree<ForceTreeT::value, ForceTimeT::value>() ||
618 is_flat<ForceFlatT::value>())
hash_value_t get_combined_hash_id(hash_value_t _lhs, hash_value_t _rhs)
References tim::get_combined_hash_id().
◆ is_flat() [1/2]
bool tim::scope::config::is_flat |
( |
| ) |
const |
|
inline |
Definition at line 539 of file types.hpp.
539 {
return this->test(flat::value); }
◆ is_flat() [2/2]
template<bool ForceFlatT>
bool tim::scope::config::is_flat |
( |
| ) |
const |
|
inline |
Definition at line 557 of file types.hpp.
559 return (ForceFlatT) ? true : this->test(flat::value);
◆ is_flat_timeline()
bool tim::scope::config::is_flat_timeline |
( |
| ) |
const |
|
inline |
◆ is_timeline()
bool tim::scope::config::is_timeline |
( |
| ) |
const |
|
inline |
Definition at line 540 of file types.hpp.
540 {
return this->test(timeline::value); }
◆ is_tree() [1/2]
bool tim::scope::config::is_tree |
( |
| ) |
const |
|
inline |
Definition at line 543 of file types.hpp.
545 return this->none() || (this->test(tree::value) && !this->test(flat::value));
◆ is_tree() [2/2]
template<bool ForceTreeT, bool ForceTimeT>
bool tim::scope::config::is_tree |
( |
| ) |
const |
|
inline |
Definition at line 563 of file types.hpp.
567 : ((ForceTimeT) ?
false
568 : (this->none() || (this->test(tree::value) &&
569 !this->test(flat::value))));
◆ is_tree_timeline()
bool tim::scope::config::is_tree_timeline |
( |
| ) |
const |
|
inline |
◆ operator+=()
template<typename T , std::enable_if_t<(std::is_same< T, tree >::value||std::is_same< T, flat >::value||std::is_same< T, timeline >::value), int > = 0>
config& tim::scope::config::operator+= |
( |
T |
| ) |
|
|
inline |
Definition at line 521 of file types.hpp.
523 this->data_type::set(T::value,
true);
◆ operator=() [1/4]
◆ operator=() [2/4]
◆ operator=() [3/4]
Definition at line 503 of file types.hpp.
506 data_type::operator=(rhs);
◆ operator=() [4/4]
Definition at line 510 of file types.hpp.
513 data_type::operator=(std::forward<data_type>(rhs));
◆ set()
template<typename T , std::enable_if_t<(std::is_same< T, tree >::value||std::is_same< T, flat >::value||std::is_same< T, timeline >::value), int > = 0>
config& tim::scope::config::set |
( |
bool |
val = true | ) |
|
|
inline |
◆ operator<<
std::ostream& operator<< |
( |
std::ostream & |
os, |
|
|
const config & |
obj |
|
) |
| |
|
friend |
Definition at line 572 of file types.hpp.
574 std::stringstream ss;
575 ss << std::boolalpha <<
"tree: " << obj.is_tree() <<
", flat: " << obj.is_flat()
576 <<
", timeline: " << obj.is_timeline()
577 <<
". Values: flat::value = " << obj.test(flat::value)
578 <<
", timeline::value = " << obj.test(timeline::value)
579 <<
", tree::value = " << obj.test(tree::value);
The documentation for this struct was generated from the following file: