Shamrock 2025.10.0
Astrophysical Code
Loading...
Searching...
No Matches
Namespaces | Functions
gather_str.hpp File Reference

MPI string gather / allgather helpers (declarations; implementations in shamalgs/src/collective/gather_str.cpp). More...

#include "shambase/aliases_int.hpp"
#include <string>
+ Include dependency graph for gather_str.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

void shamalgs::collective::gather_str (const std::string &send_vec, std::string &recv_vec)
 Gathers a string from all nodes and store the result in a std::string.
 
void shamalgs::collective::gather_basic_str (const std::basic_string< byte > &send_vec, std::basic_string< byte > &recv_vec)
 same as gather_str but with std::basic_string
 
void shamalgs::collective::allgather_str (const std::string &send_vec, std::string &recv_vec)
 Allgathers a string from all nodes and concatenates it in a std::string.
 
void shamalgs::collective::allgather_basic_str (const std::basic_string< byte > &send_vec, std::basic_string< byte > &recv_vec)
 same as allgather_str but with std::basic_string
 

Detailed Description

MPI string gather / allgather helpers (declarations; implementations in shamalgs/src/collective/gather_str.cpp).

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 gather_str.hpp.

Function Documentation

◆ allgather_basic_str()

void shamalgs::collective::allgather_basic_str ( const std::basic_string< byte > &  send_vec,
std::basic_string< byte > &  recv_vec 
)

same as allgather_str but with std::basic_string

Definition at line 151 of file gather_str.cpp.

+ Here is the call graph for this function:

◆ allgather_str()

void shamalgs::collective::allgather_str ( const std::string &  send_vec,
std::string &  recv_vec 
)

Allgathers a string from all nodes and concatenates it in a std::string.

This function gathers the string send_vec from all nodes and concatenates the result in recv_vec on every rank. The result is ordered by the order of the nodes in the communicator, i.e. the string is ordered by rank.

Definition at line 146 of file gather_str.cpp.

+ Here is the call graph for this function:

◆ gather_basic_str()

void shamalgs::collective::gather_basic_str ( const std::basic_string< byte > &  send_vec,
std::basic_string< byte > &  recv_vec 
)

same as gather_str but with std::basic_string

Definition at line 140 of file gather_str.cpp.

+ Here is the call graph for this function:

◆ gather_str()

void shamalgs::collective::gather_str ( const std::string &  send_vec,
std::string &  recv_vec 
)

Gathers a string from all nodes and store the result in a std::string.

This function gathers the string send_vec from all nodes and concatenate the result in recv_vec. The result is ordered by the order of the nodes in the communicator, i.e. the string is ordered by rank.

Todo:
add fault tolerance
Parameters
send_vecThe string to gather from all nodes
recv_vecThe result of the gather. It will contain a concatenation of all the strings gathered from the nodes.

Definition at line 135 of file gather_str.cpp.

+ Here is the call graph for this function: