Utility for storing a node as a path from root to that node and corresponding Counter.
More...
#include <report.h>
|
| TreePath (std::shared_ptr< Node< Counter >> node, bool cumulative) |
| Processes path from root nodes into list of strings and copies Counter accounting for cumulative effects. More...
|
|
|
Counter | counter |
| copy of the counter object with cumulative effects or lack of them already accounted More...
|
|
std::list< std::string > | path |
| concatenation of names from root to the node More...
|
|
size_t | depth = 0 |
| depth of the node (root is 0) More...
|
|
Utility for storing a node as a path from root to that node and corresponding Counter.
◆ TreePath()
molpro::profiler::detail::TreePath::TreePath |
( |
std::shared_ptr< Node< Counter >> |
node, |
|
|
bool |
cumulative |
|
) |
| |
|
explicit |
Processes path from root nodes into list of strings and copies Counter accounting for cumulative effects.
◆ convert_tree_to_paths()
std::list< TreePath > molpro::profiler::detail::TreePath::convert_tree_to_paths |
( |
const std::shared_ptr< Node< Counter >> & |
root, |
|
|
bool |
cumulative, |
|
|
SortBy |
sort_by |
|
) |
| |
|
static |
Performs Depth-First-Search and converts the whole tree to a list of TreePath objects.
The counter is processed so that all data is either cumulative or not. Particularly, wall time and operation count have to be taken care of.
All children are added in an ordered fashion based on sort_by.
- Parameters
-
root | root node |
cumulative | whether to use cumulative times and operation counts |
sort_by | what parameter to sort by |
◆ counter
Counter molpro::profiler::detail::TreePath::counter |
copy of the counter object with cumulative effects or lack of them already accounted
◆ depth
size_t molpro::profiler::detail::TreePath::depth = 0 |
depth of the node (root is 0)
◆ path
std::list<std::string> molpro::profiler::detail::TreePath::path |
concatenation of names from root to the node