49template <
typename Type>
52 static constexpr bool value =
true;
66 : m_storage(&_storage)
69 TIMEMORY_COLD distrib_type& operator()(distrib_type&);
70 TIMEMORY_COLD basic_tree_vector_type& operator()(basic_tree_vector_type&);
71 TIMEMORY_COLD basic_tree_map_type& operator()(basic_tree_map_type&);
73 template <
typename Archive>
78 storage_type* m_storage =
nullptr;
83template <
typename Type>
86 static constexpr bool value =
false;
91 template <
typename Tp>
98template <
typename Type>
105 auto& data = *m_storage;
106 auto _sz = results.size();
107#if defined(TIMEMORY_USE_UPCXX) && defined(TIMEMORY_USE_MPI)
109 auto _mpi = (mpi::is_initialized()) ? data.mpi_get() :
distrib_type{};
110 auto _upc = (upc::is_initialized()) ? data.upc_get() :
distrib_type{};
111 for(
auto&& itr : _mpi)
112 results.emplace_back(std::move(itr));
113 for(
auto&& itr : _upc)
114 results.emplace_back(std::move(itr));
115#elif defined(TIMEMORY_USE_UPCXX)
116 if(upc::is_initialized())
118 for(
auto&& itr : data.upc_get())
119 results.emplace_back(std::move(itr));
121#elif defined(TIMEMORY_USE_MPI)
122 if(mpi::is_initialized())
124 for(
auto&& itr : data.mpi_get())
125 results.emplace_back(std::move(itr));
129 if(_sz == results.size())
130 results.emplace_back(std::move(data.get()));
136template <
typename Type>
143 auto& data = *m_storage;
146#if defined(TIMEMORY_USE_UPCXX)
147 if(upc::is_initialized())
154#if defined(TIMEMORY_USE_MPI)
155 if(mpi::is_initialized())
171template <
typename Type>
178 auto& data = *m_storage;
181#if defined(TIMEMORY_USE_UPCXX)
182 if(upc::is_initialized())
190#if defined(TIMEMORY_USE_MPI)
191 if(mpi::is_initialized())
211template <
typename Type>
212template <
typename Archive>
219 auto& data = *m_storage;
222#if defined(TIMEMORY_USE_UPCXX)
223 if(upc::is_initialized())
230#if defined(TIMEMORY_USE_MPI)
231 if(mpi::is_initialized())
typename std::enable_if< B, T >::type enable_if_t
Alias template for enable_if.
The declaration for the types for operations without definitions.
Include the macros for operations.
Declare the operations types.
impl::storage< Type, value > storage_type
typename storage_type::graph_t graph_type
typename storage_type::dmp_result_t distrib_type
typename storage_type::result_node result_node
impl::storage< Type, value > storage_type
std::vector< basic_tree_type > basic_tree_vector_type
dmp_get(storage_type &_storage)
typename storage_type::uintvector_t hierarchy_type
typename storage_type::graph_node graph_node
typename get_type::basic_tree_vector_type basic_tree_type
std::map< std::string, basic_tree_vector_type > basic_tree_map_type
typename storage_type::result_array_t result_type