Arcane  4.2.3.0
Developer documentation
Loading...
Searching...
No Matches
Int64AllToAll.h
1// -*- tab-width: 2; indent-tabs-mode: nil; coding: utf-8-with-signature -*-
2//-----------------------------------------------------------------------------
3// Copyright 2000-2026 CEA (www.cea.fr) IFPEN (www.ifpenergiesnouvelles.com)
4// See the top-level COPYRIGHT file for details.
5// SPDX-License-Identifier: Apache-2.0
6//-----------------------------------------------------------------------------
7/*---------------------------------------------------------------------------*/
8/* Int64AllToAll.h (C) 2000-2026 */
9/* */
10/* Variable all-to-all of Int64, in rounds past what MPI counts. */
11/*---------------------------------------------------------------------------*/
12#ifndef ARCANE_MESH_INTERNAL_INT64ALLTOALL_H
13#define ARCANE_MESH_INTERNAL_INT64ALLTOALL_H
14/*---------------------------------------------------------------------------*/
15/*---------------------------------------------------------------------------*/
16
17#include "arcane/utils/Array.h"
18
20
21/*---------------------------------------------------------------------------*/
22/*---------------------------------------------------------------------------*/
23
24namespace Arcane::mesh
25{
26
27/*---------------------------------------------------------------------------*/
28/*---------------------------------------------------------------------------*/
38{
39 public:
40
47 static Int64 exchangeCounts(IParallelMng* pm, ConstArrayView<Int64> send_count, Array<Int64>& recv_count);
48
51 ConstArrayView<Int64> recv_count, Int64 nb_round);
52
54 void wait();
55
57 Span<const Int64> received() const { return m_recv.constSpan(); }
58
60 Span<const Int64> from(Int32 rank) const;
61
62 private:
63
64 static Int64 _nbRound(Int64 g_max, Int32 nb_rank);
65
66 private:
67
68 IParallelMng* m_pm = nullptr;
69 UniqueArray<Int64> m_recv;
70 UniqueArray<Int64> m_recv_index;
71 Parallel::Request m_request;
72 bool m_is_pending = false;
73 Int32UniqueArray m_send_count;
74 Int32UniqueArray m_send_index;
75 Int32UniqueArray m_recv_count;
76 Int32UniqueArray m_recv_index32;
77};
78
79/*---------------------------------------------------------------------------*/
80/*---------------------------------------------------------------------------*/
81
82} // namespace Arcane::mesh
83
84/*---------------------------------------------------------------------------*/
85/*---------------------------------------------------------------------------*/
86
87#endif
File containing declarations concerning the message passing model.
Base class for 1D data vectors.
Constant view of an array of type T.
Interface of the parallelism manager for a subdomain.
View of an array of elements of type T.
Definition Span.h:633
1D data vector with value semantics (STL style).
A variable all-to-all of Int64.
void start(IParallelMng *pm, ConstArrayView< Int64 > send, ConstArrayView< Int64 > send_count, ConstArrayView< Int64 > recv_count, Int64 nb_round)
Posts the exchange of send, send_count[r] Int64 for rank r.
Span< const Int64 > received() const
What was received, grouped by sending rank.
static Int64 _nbRound(Int64 g_max, Int32 nb_rank)
static Int64 exchangeCounts(IParallelMng *pm, ConstArrayView< Int64 > send_count, Array< Int64 > &recv_count)
Exchanges the counts, per rank, of what an exchange will bring.
void wait()
Completes the exchange.
Span< const Int64 > from(Int32 rank) const
What rank sent.
std::int64_t Int64
Signed integer type of 64 bits.
UniqueArray< Int32 > Int32UniqueArray
Dynamic 1D array of 32-bit integers.
Definition UtilsTypes.h:335
std::int32_t Int32
Signed integer type of 32 bits.