Shamrock 2025.10.0
Astrophysical Code
Loading...
Searching...
No Matches
exchanges.hpp File Reference
Include dependency graph for exchanges.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace  shamalgs
 namespace to contain everything implemented by shamalgs

Functions

template<class T>
void shamalgs::collective::vector_allgatherv_ks (const std::vector< T > &send_vec, const MPI_Datatype send_type, std::vector< T > &recv_vec, const MPI_Datatype recv_type, const MPI_Comm comm)
 allgatherv with knowing total count of object //TODO add fault tolerance
template<class T>
std::vector< int > shamalgs::collective::vector_allgatherv (const std::vector< T > &send_vec, const MPI_Datatype &send_type, std::vector< T > &recv_vec, const MPI_Datatype &recv_type, const MPI_Comm comm)
 allgatherv on vector with size query (size querying variant of vector_allgatherv_ks) //TODO add fault tolerance
template<class T>
void shamalgs::collective::vector_allgatherv_large (const std::vector< T > &send_vec, const MPI_Datatype &send_type, std::vector< T > &recv_vec, const MPI_Datatype &recv_type, const MPI_Comm comm, u32 com_per_step=(1_i32<< 29)/static_cast< u32 >(shamcomm::world_size()))
 vector_allgatherv version that support having more than 2^31 elements in flight
template<class T>
void shamalgs::collective::vector_allgatherv (const std::vector< T > &send_vec, std::vector< T > &recv_vec, const MPI_Comm comm)
 Simplified allgatherv wrapper using default MPI type.

Detailed Description

Author
Timothée David–Cléris (tim.s.nosp@m.hamr.nosp@m.ock@p.nosp@m.roto.nosp@m.n.me)

Definition in file exchanges.hpp.

Function Documentation

◆ vector_allgatherv() [1/2]

template<class T>
std::vector< int > shamalgs::collective::vector_allgatherv ( const std::vector< T > & send_vec,
const MPI_Datatype & send_type,
std::vector< T > & recv_vec,
const MPI_Datatype & recv_type,
const MPI_Comm comm )
inline

allgatherv on vector with size query (size querying variant of vector_allgatherv_ks) //TODO add fault tolerance

Template Parameters
T
Parameters
send_vec
send_type
recv_vec
recv_type
Returns
the node displacements data table

Definition at line 98 of file exchanges.hpp.

Here is the call graph for this function:

◆ vector_allgatherv() [2/2]

template<class T>
void shamalgs::collective::vector_allgatherv ( const std::vector< T > & send_vec,
std::vector< T > & recv_vec,
const MPI_Comm comm )
inline

Simplified allgatherv wrapper using default MPI type.

Template Parameters
TType of elements to gather
Parameters
send_vecVector to send from this rank
recv_vecVector to receive all gathered data
commMPI communicator

Definition at line 227 of file exchanges.hpp.

◆ vector_allgatherv_ks()

template<class T>
void shamalgs::collective::vector_allgatherv_ks ( const std::vector< T > & send_vec,
const MPI_Datatype send_type,
std::vector< T > & recv_vec,
const MPI_Datatype recv_type,
const MPI_Comm comm )
inline

allgatherv with knowing total count of object //TODO add fault tolerance

Template Parameters
T
Parameters
send_vec
send_type
recv_vec
recv_type

Definition at line 44 of file exchanges.hpp.

Here is the call graph for this function:

◆ vector_allgatherv_large()

template<class T>
void shamalgs::collective::vector_allgatherv_large ( const std::vector< T > & send_vec,
const MPI_Datatype & send_type,
std::vector< T > & recv_vec,
const MPI_Datatype & recv_type,
const MPI_Comm comm,
u32 com_per_step = (1_i32 << 29) / static_cast<u32>(shamcomm::world_size()) )
inline

vector_allgatherv version that support having more than 2^31 elements in flight

Template Parameters
T
Parameters
send_vec
send_type
recv_vec
recv_type
comm
com_per_step

Definition at line 175 of file exchanges.hpp.

Here is the call graph for this function: