Arcane  4.2.3.0
Developer documentation
Loading...
Searching...
No Matches
Arcane::mesh::Int64AllToAll Class Reference

A variable all-to-all of Int64. More...

#include <arcane/mesh/internal/Int64AllToAll.h>

Collaboration diagram for Arcane::mesh::Int64AllToAll:

Public Member Functions

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.
void wait ()
 Completes the exchange.
Span< const Int64 > received () const
 What was received, grouped by sending rank.
Span< const Int64 > from (Int32 rank) const
 What rank sent.

Static Public Member Functions

static Int64 exchangeCounts (IParallelMng *pm, ConstArrayView< Int64 > send_count, Array< Int64 > &recv_count)
 Exchanges the counts, per rank, of what an exchange will bring.

Static Private Member Functions

static Int64 _nbRound (Int64 g_max, Int32 nb_rank)

Private Attributes

IParallelMng * m_pm = nullptr
UniqueArray< Int64 > m_recv
UniqueArray< Int64 > m_recv_index
Parallel::Request m_request
bool m_is_pending = false
Int32UniqueArray m_send_count
Int32UniqueArray m_send_index
Int32UniqueArray m_recv_count
Int32UniqueArray m_recv_index32

Detailed Description

A variable all-to-all of Int64.

The send buffer is grouped by destination. In one round the exchange is posted non-blocking when the parallel manager offers it, so that the caller can work until wait(); in several rounds it is done at once. The send buffer must stay alive until wait().

Definition at line 37 of file Int64AllToAll.h.

Member Function Documentation

◆ _nbRound()

Int64 Arcane::mesh::Int64AllToAll::_nbRound ( Int64 g_max,
Int32 nb_rank )
staticprivate

g_max is the largest number of Int64 any rank sends or receives over the whole exchange. A round sends at most ceil(count / nb_round) to each rank, so at most g_max / nb_round + nb_rank in all.

Definition at line 37 of file Int64AllToAll.cc.

Referenced by exchangeCounts().

Here is the caller graph for this function:

◆ exchangeCounts()

Int64 Arcane::mesh::Int64AllToAll::exchangeCounts ( IParallelMng * pm,
ConstArrayView< Int64 > send_count,
Array< Int64 > & recv_count )
static

Exchanges the counts, per rank, of what an exchange will bring.

Returns
the number of rounds the exchange needs so that no rank sends or receives, in one round, more Int64 than MPI counts in Int32.

Definition at line 47 of file Int64AllToAll.cc.

References _nbRound(), Arcane::IParallelMng::commSize(), Arcane::IParallelMng::reduce(), Arcane::MessagePassing::ReduceMax, and Arcane::Array< T >::resize().

Referenced by Arcane::mesh::FaceUniqueIdBuilder::_v1Distributed().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ from()

Span< const Int64 > Arcane::mesh::Int64AllToAll::from ( Int32 rank) const

What rank sent.

Definition at line 151 of file Int64AllToAll.cc.

References Arcane::Span< T, Extent >::subSpan().

Referenced by Arcane::mesh::FaceUniqueIdBuilder::_v1Distributed().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ received()

Span< const Int64 > Arcane::mesh::Int64AllToAll::received ( ) const
inline

What was received, grouped by sending rank.

Definition at line 57 of file Int64AllToAll.h.

Referenced by Arcane::mesh::FaceUniqueIdBuilder::_v1Distributed().

Here is the caller graph for this function:

◆ start()

void Arcane::mesh::Int64AllToAll::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.

Definition at line 65 of file Int64AllToAll.cc.

References Arcane::IParallelMng::commSize(), Arcane::ConstArrayView< T >::data(), Arcane::IParallelMng::nonBlockingCollective(), and Arcane::Array< T >::resize().

Referenced by Arcane::mesh::FaceUniqueIdBuilder::_v1Distributed().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ wait()

void Arcane::mesh::Int64AllToAll::wait ( )

Completes the exchange.

Definition at line 140 of file Int64AllToAll.cc.

Referenced by Arcane::mesh::FaceUniqueIdBuilder::_v1Distributed().

Here is the caller graph for this function:

Member Data Documentation

◆ m_is_pending

bool Arcane::mesh::Int64AllToAll::m_is_pending = false
private

Definition at line 72 of file Int64AllToAll.h.

◆ m_pm

IParallelMng* Arcane::mesh::Int64AllToAll::m_pm = nullptr
private

Definition at line 68 of file Int64AllToAll.h.

◆ m_recv

UniqueArray<Int64> Arcane::mesh::Int64AllToAll::m_recv
private

Definition at line 69 of file Int64AllToAll.h.

◆ m_recv_count

Int32UniqueArray Arcane::mesh::Int64AllToAll::m_recv_count
private

Definition at line 75 of file Int64AllToAll.h.

◆ m_recv_index

UniqueArray<Int64> Arcane::mesh::Int64AllToAll::m_recv_index
private

Definition at line 70 of file Int64AllToAll.h.

◆ m_recv_index32

Int32UniqueArray Arcane::mesh::Int64AllToAll::m_recv_index32
private

Definition at line 76 of file Int64AllToAll.h.

◆ m_request

Parallel::Request Arcane::mesh::Int64AllToAll::m_request
private

Definition at line 71 of file Int64AllToAll.h.

◆ m_send_count

Int32UniqueArray Arcane::mesh::Int64AllToAll::m_send_count
private

Definition at line 73 of file Int64AllToAll.h.

◆ m_send_index

Int32UniqueArray Arcane::mesh::Int64AllToAll::m_send_index
private

Definition at line 74 of file Int64AllToAll.h.


The documentation for this class was generated from the following files: