KaMPIng 0.1.1
Flexible and (near) zero-overhead C++ bindings for MPI
Loading...
Searching...
No Matches
kamping::measurements::AggregatedTreeNode< DataType > Class Template Reference

Class representing a node in an (globally) aggregated tree, i.e., a node of a timer (or counter) tree where the global aggregation operations has been performed and which can be printed. More...

#include <aggregated_tree_node.hpp>

Inheritance diagram for kamping::measurements::AggregatedTreeNode< DataType >:
Collaboration diagram for kamping::measurements::AggregatedTreeNode< DataType >:

Public Types

using StorageType = std::unordered_map<GlobalAggregationMode, std::vector<ScalarOrContainer<DataType>>>
 Type into which the aggregated data is stored together with the applied aggregation operation.
 

Public Member Functions

auto constaggregated_data () const
 Access to stored aggregated data.
 
void add (GlobalAggregationMode aggregation_mode, std::optional< DataType > data)
 Add scalar of type T to aggregated data storage together with the name of the applied aggregation operation.
 
void add (GlobalAggregationMode aggregation_mode, std::vector< DataType > const &data)
 Add scalar of type T to aggregated data storage together with the name of the applied aggregation operation.
 
- Public Member Functions inherited from kamping::measurements::internal::TreeNode< AggregatedTreeNode< DataType > >
 TreeNode ()
 Constructs node without pointer to parent and empty name.
 
 TreeNode (std::string const &name)
 Constructs node without pointer to parent.
 
 TreeNode (std::string const &name, AggregatedTreeNode< DataType > *parent)
 Constructs node pointer to parent.
 
autofind_or_insert (std::string const &name)
 Searches the node's children for a node with the given name. If there is no such child a new node is inserted.
 
autoparent_ptr ()
 Access to the parent pointer.
 
auto constchildren () const
 Access to the node's children.
 
auto constname () const
 Access to the node's children.
 

Public Attributes

StorageType _aggregated_data
 Storage of the aggregated data.
 

Detailed Description

template<typename DataType>
class kamping::measurements::AggregatedTreeNode< DataType >

Class representing a node in an (globally) aggregated tree, i.e., a node of a timer (or counter) tree where the global aggregation operations has been performed and which can be printed.

Template Parameters
DataTypeUnderlying data type.

Member Function Documentation

◆ add() [1/2]

template<typename DataType >
void kamping::measurements::AggregatedTreeNode< DataType >::add ( GlobalAggregationMode aggregation_mode,
std::optional< DataType > data )
inline

Add scalar of type T to aggregated data storage together with the name of the applied aggregation operation.

Parameters
aggregation_modeAggregation mode that has been applied to the data.
dataScalar resulted from applying the given aggregation operation.

◆ add() [2/2]

template<typename DataType >
void kamping::measurements::AggregatedTreeNode< DataType >::add ( GlobalAggregationMode aggregation_mode,
std::vector< DataType > const & data )
inline

Add scalar of type T to aggregated data storage together with the name of the applied aggregation operation.

Parameters
aggregation_modeAggregation mode that has been applied to the duration data.
dataVector of Scalars resulted from applying the given aggregation operation.

◆ aggregated_data()

template<typename DataType >
auto const & kamping::measurements::AggregatedTreeNode< DataType >::aggregated_data ( ) const
inline

Access to stored aggregated data.

Returns
Reference to aggregated data.

The documentation for this class was generated from the following file: