100class HybridParallelDispatch
133 Int32 m_min_rank = A_NULL_RANK;
134 Int32 m_max_rank = A_NULL_RANK;
142 ArrayView<HybridParallelDispatch<Type>*> all_dispatchs);
143 ~HybridParallelDispatch()
override;
144 void finalize()
override;
159 void allReduce(eReduceType op,
Span<Type> send_buf)
override;
166 Request send(
Span<const Type> send_buffer,
const PointToPointMessageInfo& message)
override;
167 Request receive(
Span<Type> recv_buffer,
Int32 rank,
bool is_blocked)
override;
168 Request receive(
Span<Type> recv_buffer,
const PointToPointMessageInfo& message)
override;
171 Request nonBlockingBroadcast(
Span<Type> send_buf,
Int32 rank)
override;
182 this->broadcast(
Span<Type>(send_buf), sub_domain);
192 void gather(ConstArrayView<Type> send_buf, ArrayView<Type> recv_buf,
Integer rank)
override
194 this->gather(Span<const Type>(send_buf), Span<Type>(recv_buf), rank);
196 void gatherVariable(ConstArrayView<Type> send_buf, Array<Type>& recv_buf,
Integer rank)
override
198 this->gatherVariable(Span<const Type>(send_buf), recv_buf, rank);
200 void scatterVariable(ConstArrayView<Type> send_buf, ArrayView<Type> recv_buf,
Integer root)
override
202 this->scatterVariable(Span<const Type>(send_buf), Span<Type>(recv_buf), root);
204 void allToAll(ConstArrayView<Type> send_buf, ArrayView<Type> recv_buf,
Integer count)
override
206 this->allToAll(Span<const Type>(send_buf), Span<Type>(recv_buf), count);
212 this->allToAllVariable(Span<const Type>(send_buf), send_count, send_index,
213 Span<Type>(recv_buf), recv_count, recv_index);
215 Request send(ConstArrayView<Type> send_buffer,
Integer proc,
bool is_blocked)
override
217 return this->send(Span<const Type>(send_buffer), proc, is_blocked);
219 Request recv(ArrayView<Type> recv_buffer,
Integer proc,
bool is_blocked)
override
221 return this->receive(Span<Type>(recv_buffer), proc, is_blocked);
223 void allReduce(eReduceType op, ArrayView<Type> send_buf)
override
225 return this->allReduce(op, Span<Type>(send_buf));
227 void allReduce(eReduceType op, ConstArrayView<Type> send_buf, ArrayView<Type> receive_buf)
override
229 return this->allReduce(op, Span<const Type>(send_buf), Span<Type>(receive_buf));
232 void send(ConstArrayView<Type> send_buffer,
Integer proc)
override;
233 void recv(ArrayView<Type> recv_buffer,
Integer proc)
override;
234 void sendRecv(ConstArrayView<Type> send_buffer, ArrayView<Type> recv_buffer,
Integer proc)
override;
235 Type allReduce(eReduceType op,
Type send_buf)
override;
236 Type scan(eReduceType op,
Type send_buf)
override;
237 void scan(eReduceType op, ArrayView<Type> send_buf)
override;
238 void computeMinMaxSum(
Type val,
Type& min_val,
Type& max_val,
Type& sum_val,
240 Int32& max_rank)
override;
241 void computeMinMaxSum(ConstArrayView<Type> values,
242 ArrayView<Type> min_values,
243 ArrayView<Type> max_values,
244 ArrayView<Type> sum_values,
245 ArrayView<Int32> min_ranks,
246 ArrayView<Int32> max_ranks)
override;
247 ITypeDispatcher<Type>* toArccoreDispatcher()
override {
return this; }
251 HybridParallelMng* m_parallel_mng =
nullptr;
252 Int32 m_local_rank = A_NULL_RANK;
253 Int32 m_local_nb_rank = 0;
254 Int32 m_global_rank = A_NULL_RANK;
255 Int32 m_global_nb_rank = 0;
256 Int32 m_mpi_rank = A_NULL_RANK;
257 Int32 m_mpi_nb_rank = 0;
261 using AllDispatchView = ArrayView<HybridParallelDispatch<Type>*>;
262 Int32 globalRank()
const {
return m_global_rank; }
263 AllDispatchView m_all_dispatchs;
267 Span<Type> m_broadcast_view;
268 Span<const Type> m_const_view;
269 Span<Type> m_recv_view;
270 Span<const Type> m_send_view;
280 HybridMessageQueue* m_message_queue =
nullptr;
281 MpiParallelDispatchT<Type>* m_mpi_dispatcher =
nullptr;
285 void _collectiveBarrier();
286 void _allReduceOrScan(eReduceType op, Span<const Type> send_buf, Span<Type> receive_buf,
bool is_scan);
287 void _applyReduceOperator(eReduceType op, Span<Type> result, AllDispatchView dispatch_view,