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.
tim::operation::finalize::merge< Type, false > Struct Template Reference

#include "timemory/operations/types.hpp"

+ Collaboration diagram for tim::operation::finalize::merge< Type, false >:

Public Types

using storage_type = impl::storage< Type, has_data >
 
using singleton_t = typename storage_type::singleton_type
 
using graph_t = typename storage_type::graph_type
 
using result_type = typename storage_type::result_array_t
 

Public Member Functions

 merge (storage_type &lhs, storage_type &rhs)
 
 merge (result_type &, const result_type &)
 

Static Public Attributes

static constexpr bool has_data = false
 

Detailed Description

template<typename Type>
struct tim::operation::finalize::merge< Type, false >

Definition at line 1141 of file types.hpp.

Member Typedef Documentation

◆ graph_t

template<typename Type >
using tim::operation::finalize::merge< Type, false >::graph_t = typename storage_type::graph_type

Definition at line 1146 of file types.hpp.

◆ result_type

template<typename Type >
using tim::operation::finalize::merge< Type, false >::result_type = typename storage_type::result_array_t

Definition at line 1147 of file types.hpp.

◆ singleton_t

template<typename Type >
using tim::operation::finalize::merge< Type, false >::singleton_t = typename storage_type::singleton_type

Definition at line 1145 of file types.hpp.

◆ storage_type

template<typename Type >
using tim::operation::finalize::merge< Type, false >::storage_type = impl::storage<Type, has_data>

Definition at line 1144 of file types.hpp.

Constructor & Destructor Documentation

◆ merge() [1/2]

template<typename Type >
tim::operation::finalize::merge< Type, false >::merge ( storage_type lhs,
storage_type rhs 
)

Definition at line 519 of file merge.hpp.

520{
521 rhs.stack_clear();
522
523 // create lock
524 auto_lock_t l(singleton_t::get_mutex(), std::defer_lock);
525 if(!l.owns_lock())
526 l.lock();
527
528 for(const auto& itr : *rhs.get_hash_ids())
529 {
530 if(lhs.m_hash_ids->find(itr.first) == lhs.m_hash_ids->end())
531 (*lhs.m_hash_ids)[itr.first] = itr.second;
532 }
533 for(const auto& itr : (*rhs.get_hash_aliases()))
534 {
535 if(lhs.m_hash_aliases->find(itr.first) == lhs.m_hash_aliases->end())
536 (*lhs.m_hash_aliases)[itr.first] = itr.second;
537 }
538}
std::unique_lock< mutex_t > auto_lock_t
Unique lock type around mutex_t.
Definition: locking.hpp:42

◆ merge() [2/2]

template<typename Type >
tim::operation::finalize::merge< Type, false >::merge ( result_type ,
const result_type  
)
inline

Definition at line 1150 of file types.hpp.

1150{}

Member Data Documentation

◆ has_data

template<typename Type >
constexpr bool tim::operation::finalize::merge< Type, false >::has_data = false
staticconstexpr

Definition at line 1143 of file types.hpp.


The documentation for this struct was generated from the following files: