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 452 of file types.hpp.
◆ config() [1/12]
tim::scope::config::config |
( |
| ) |
|
|
inline |
Definition at line 454 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 466 of file types.hpp.
468 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 471 of file types.hpp.
473 make_index_sequence<scope_count>{}))
◆ config() [6/12]
tim::scope::config::config |
( |
bool |
_flat, |
|
|
bool |
_timeline, |
|
|
bool |
_tree |
|
) |
| |
|
inlineexplicit |
Definition at line 476 of file types.hpp.
478 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()
uint64_t tim::scope::config::compute_depth |
( |
uint64_t |
_current | ) |
|
|
inline |
Definition at line 593 of file types.hpp.
595 static_assert(!(ForceTreeT::value && ForceFlatT::value),
596 "Error! Type cannot enforce tree-based call-stack depth storage "
597 "and flat call-stack depth storage simulatenously");
601 if(ForceFlatT::value ||
is_flat())
◆ compute_hash()
uint64_t tim::scope::config::compute_hash |
( |
uint64_t |
_id, |
|
|
uint64_t |
_depth, |
|
|
uint64_t & |
_counter |
|
) |
| |
|
inline |
Definition at line 616 of file types.hpp.
624 if(is_tree<ForceTreeT::value, ForceTimeT::value>() ||
625 is_flat<ForceFlatT::value>())
hash_value_t get_combined_hash_id(hash_value_t _lhs, hash_value_t _rhs)
References tim::hash::get_combined_hash_id().
◆ is_flat() [1/2]
bool tim::scope::config::is_flat |
( |
| ) |
const |
|
inline |
Definition at line 546 of file types.hpp.
546{
return this->test(flat::value); }
◆ is_flat() [2/2]
template<bool ForceFlatT>
bool tim::scope::config::is_flat |
( |
| ) |
const |
|
inline |
Definition at line 564 of file types.hpp.
566 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 547 of file types.hpp.
547{
return this->test(timeline::value); }
◆ is_tree() [1/2]
bool tim::scope::config::is_tree |
( |
| ) |
const |
|
inline |
Definition at line 550 of file types.hpp.
552 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 570 of file types.hpp.
574 : ((ForceTimeT) ?
false
575 : (this->none() || (this->test(tree::value) &&
576 !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 528 of file types.hpp.
530 this->data_type::set(T::value,
true);
◆ operator=() [1/4]
◆ operator=() [2/4]
◆ operator=() [3/4]
Definition at line 510 of file types.hpp.
513 data_type::operator=(rhs);
◆ operator=() [4/4]
Definition at line 517 of file types.hpp.
520 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 579 of file types.hpp.
581 std::stringstream ss;
582 ss << std::boolalpha <<
"tree: " << obj.is_tree() <<
", flat: " << obj.is_flat()
583 <<
", timeline: " << obj.is_timeline()
584 <<
". Values: flat::value = " << obj.test(flat::value)
585 <<
", timeline::value = " << obj.test(timeline::value)
586 <<
", tree::value = " << obj.test(tree::value);
const std::string std::ostream * os
The documentation for this struct was generated from the following file: