108class HybridParallelDispatch
143 Int32 m_min_rank = A_NULL_RANK;
144 Int32 m_max_rank = A_NULL_RANK;
153 ArrayView<HybridParallelDispatch<Type>*> all_dispatchs);
154 ~HybridParallelDispatch()
override;
155 void finalize()
override;
170 void allReduce(eReduceType op,
Span<Type> send_buf)
override;
176 Request send(
Span<const Type> send_buffer,
const PointToPointMessageInfo& message)
override;
177 Request receive(
Span<Type> recv_buffer,
Int32 rank,
bool is_blocked)
override;
178 Request receive(
Span<Type> recv_buffer,
const PointToPointMessageInfo& message)
override;
181 Request nonBlockingBroadcast(
Span<Type> send_buf,
Int32 rank)
override;
192 this->broadcast(
Span<Type>(send_buf), sub_domain);
202 void gather(ConstArrayView<Type> send_buf, ArrayView<Type> recv_buf,
Integer rank)
override
204 this->gather(Span<const Type>(send_buf), Span<Type>(recv_buf), rank);
206 void gatherVariable(ConstArrayView<Type> send_buf, Array<Type>& recv_buf,
Integer rank)
override
208 this->gatherVariable(Span<const Type>(send_buf), recv_buf, rank);
210 void scatterVariable(ConstArrayView<Type> send_buf, ArrayView<Type> recv_buf,
Integer root)
override
212 this->scatterVariable(Span<const Type>(send_buf), Span<Type>(recv_buf), root);
214 void allToAll(ConstArrayView<Type> send_buf, ArrayView<Type> recv_buf,
Integer count)
override
216 this->allToAll(Span<const Type>(send_buf), Span<Type>(recv_buf), count);
222 this->allToAllVariable(Span<const Type>(send_buf), send_count, send_index,
223 Span<Type>(recv_buf), recv_count, recv_index);
225 Request send(ConstArrayView<Type> send_buffer,
Integer proc,
bool is_blocked)
override
227 return this->send(Span<const Type>(send_buffer), proc, is_blocked);
229 Request recv(ArrayView<Type> recv_buffer,
Integer proc,
bool is_blocked)
override
231 return this->receive(Span<Type>(recv_buffer), proc, is_blocked);
233 void allReduce(eReduceType op, ArrayView<Type> send_buf)
override
235 return this->allReduce(op, Span<Type>(send_buf));
238 void send(ConstArrayView<Type> send_buffer,
Integer proc)
override;
239 void recv(ArrayView<Type> recv_buffer,
Integer proc)
override;
240 void sendRecv(ConstArrayView<Type> send_buffer, ArrayView<Type> recv_buffer,
Integer proc)
override;
241 Type allReduce(eReduceType op,
Type send_buf)
override;
242 Type scan(eReduceType op,
Type send_buf)
override;
243 void scan(eReduceType op, ArrayView<Type> send_buf)
override;
244 void computeMinMaxSum(
Type val,
Type& min_val,
Type& max_val,
Type& sum_val,
246 Int32& max_rank)
override;
247 void computeMinMaxSum(ConstArrayView<Type> values,
248 ArrayView<Type> min_values,
249 ArrayView<Type> max_values,
250 ArrayView<Type> sum_values,
251 ArrayView<Int32> min_ranks,
252 ArrayView<Int32> max_ranks)
override;
253 ITypeDispatcher<Type>* toArccoreDispatcher()
override {
return this; }
257 HybridParallelMng* m_parallel_mng =
nullptr;
258 Int32 m_local_rank = A_NULL_RANK;
259 Int32 m_local_nb_rank = 0;
260 Int32 m_global_rank = A_NULL_RANK;
261 Int32 m_global_nb_rank = 0;
262 Int32 m_mpi_rank = A_NULL_RANK;
263 Int32 m_mpi_nb_rank = 0;
267 using AllDispatchView = ArrayView<HybridParallelDispatch<Type>*>;
268 Int32 globalRank()
const {
return m_global_rank; }
269 AllDispatchView m_all_dispatchs;
273 Span<Type> m_broadcast_view;
274 Span<const Type> m_const_view;
275 Span<Type> m_recv_view;
276 Span<const Type> m_send_view;
286 HybridMessageQueue* m_message_queue =
nullptr;
287 MpiParallelDispatchT<Type>* m_mpi_dispatcher =
nullptr;
291 void _collectiveBarrier();
292 void _allReduceOrScan(eReduceType op, Span<Type> send_buf,
bool is_scan);
293 void _applyReduceOperator(eReduceType op, Span<Type> result, AllDispatchView dispatch_view,