108class HybridParallelDispatch
144 Int32 m_min_rank = A_NULL_RANK;
145 Int32 m_max_rank = A_NULL_RANK;
154 ArrayView<HybridParallelDispatch<Type>*> all_dispatchs);
155 ~HybridParallelDispatch()
override;
156 void finalize()
override;
171 void allReduce(eReduceType op,
Span<Type> send_buf)
override;
178 Request send(
Span<const Type> send_buffer,
const PointToPointMessageInfo& message)
override;
179 Request receive(
Span<Type> recv_buffer,
Int32 rank,
bool is_blocked)
override;
180 Request receive(
Span<Type> recv_buffer,
const PointToPointMessageInfo& message)
override;
183 Request nonBlockingBroadcast(
Span<Type> send_buf,
Int32 rank)
override;
194 this->broadcast(
Span<Type>(send_buf), sub_domain);
204 void gather(ConstArrayView<Type> send_buf, ArrayView<Type> recv_buf,
Integer rank)
override
206 this->gather(Span<const Type>(send_buf), Span<Type>(recv_buf), rank);
208 void gatherVariable(ConstArrayView<Type> send_buf, Array<Type>& recv_buf,
Integer rank)
override
210 this->gatherVariable(Span<const Type>(send_buf), recv_buf, rank);
212 void scatterVariable(ConstArrayView<Type> send_buf, ArrayView<Type> recv_buf,
Integer root)
override
214 this->scatterVariable(Span<const Type>(send_buf), Span<Type>(recv_buf), root);
216 void allToAll(ConstArrayView<Type> send_buf, ArrayView<Type> recv_buf,
Integer count)
override
218 this->allToAll(Span<const Type>(send_buf), Span<Type>(recv_buf), count);
224 this->allToAllVariable(Span<const Type>(send_buf), send_count, send_index,
225 Span<Type>(recv_buf), recv_count, recv_index);
227 Request send(ConstArrayView<Type> send_buffer,
Integer proc,
bool is_blocked)
override
229 return this->send(Span<const Type>(send_buffer), proc, is_blocked);
231 Request recv(ArrayView<Type> recv_buffer,
Integer proc,
bool is_blocked)
override
233 return this->receive(Span<Type>(recv_buffer), proc, is_blocked);
235 void allReduce(eReduceType op, ArrayView<Type> send_buf)
override
237 return this->allReduce(op, Span<Type>(send_buf));
239 void allReduce(eReduceType op, ConstArrayView<Type> send_buf, ArrayView<Type> receive_buf)
override
241 return this->allReduce(op, Span<const Type>(send_buf), Span<Type>(receive_buf));
244 void send(ConstArrayView<Type> send_buffer,
Integer proc)
override;
245 void recv(ArrayView<Type> recv_buffer,
Integer proc)
override;
246 void sendRecv(ConstArrayView<Type> send_buffer, ArrayView<Type> recv_buffer,
Integer proc)
override;
247 Type allReduce(eReduceType op,
Type send_buf)
override;
248 Type scan(eReduceType op,
Type send_buf)
override;
249 void scan(eReduceType op, ArrayView<Type> send_buf)
override;
250 void computeMinMaxSum(
Type val,
Type& min_val,
Type& max_val,
Type& sum_val,
252 Int32& max_rank)
override;
253 void computeMinMaxSum(ConstArrayView<Type> values,
254 ArrayView<Type> min_values,
255 ArrayView<Type> max_values,
256 ArrayView<Type> sum_values,
257 ArrayView<Int32> min_ranks,
258 ArrayView<Int32> max_ranks)
override;
259 ITypeDispatcher<Type>* toArccoreDispatcher()
override {
return this; }
263 HybridParallelMng* m_parallel_mng =
nullptr;
264 Int32 m_local_rank = A_NULL_RANK;
265 Int32 m_local_nb_rank = 0;
266 Int32 m_global_rank = A_NULL_RANK;
267 Int32 m_global_nb_rank = 0;
268 Int32 m_mpi_rank = A_NULL_RANK;
269 Int32 m_mpi_nb_rank = 0;
273 using AllDispatchView = ArrayView<HybridParallelDispatch<Type>*>;
274 Int32 globalRank()
const {
return m_global_rank; }
275 AllDispatchView m_all_dispatchs;
279 Span<Type> m_broadcast_view;
280 Span<const Type> m_const_view;
281 Span<Type> m_recv_view;
282 Span<const Type> m_send_view;
292 HybridMessageQueue* m_message_queue =
nullptr;
293 MpiParallelDispatchT<Type>* m_mpi_dispatcher =
nullptr;
297 void _collectiveBarrier();
298 void _allReduceOrScan(eReduceType op, Span<const Type> send_buf, Span<Type> receive_buf,
bool is_scan);
299 void _applyReduceOperator(eReduceType op, Span<Type> result, AllDispatchView dispatch_view,