Shamrock 2025.10.0
Astrophysical Code
Loading...
Searching...
No Matches
Classes | Namespaces | Typedefs | Functions
distributedDataComm.hpp File Reference
#include "shambase/DistributedData.hpp"
#include "shambase/DistributedDataShared.hpp"
#include "shambase/stacktrace.hpp"
#include "shamalgs/collective/exchanges.hpp"
#include "shamalgs/collective/sparseXchg.hpp"
#include "shambackends/SyclMpiTypes.hpp"
#include "shambackends/typeAliasVec.hpp"
#include "shamcomm/logs.hpp"
#include <functional>
#include <mpi.h>
#include <optional>
#include <stdexcept>
#include <vector>
+ Include dependency graph for distributedDataComm.hpp:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  shamalgs::collective::DDSCommCacheTarget< target >
 
struct  shamalgs::collective::DDSCommCache
 

Namespaces

namespace  shamalgs
 namespace to contain everything implemented by shamalgs
 

Typedefs

using shamalgs::collective::SerializedDDataComm = shambase::DistributedDataShared< sham::DeviceBuffer< u8 > >
 

Functions

void shamalgs::collective::distributed_data_sparse_comm (std::shared_ptr< sham::DeviceScheduler > dev_sched, SerializedDDataComm &send_ddistrib_data, SerializedDDataComm &recv_distrib_data, std::function< i32(u64)> rank_getter, DDSCommCache &cache, std::optional< SparseCommTable > comm_table={}, size_t max_comm_size=i32_max - 1)
 
template<class T >
void shamalgs::collective::serialize_sparse_comm (std::shared_ptr< sham::DeviceScheduler > dev_sched, shambase::DistributedDataShared< T > &&send_distrib_data, shambase::DistributedDataShared< T > &recv_distrib_data, std::function< i32(u64)> rank_getter, std::function< sham::DeviceBuffer< u8 >(T &)> serialize, std::function< T(sham::DeviceBuffer< u8 > &&)> deserialize, DDSCommCache &cache, std::optional< SparseCommTable > comm_table={})
 
template<class T , class P >
shambase::DistributedData< T > shamalgs::collective::fetch_all_simple (shambase::DistributedData< T > &src, std::vector< P > local_ids, std::vector< P > global_ids, std::function< u64(P)> id_getter)
 global ids = allgatherv(local_ids)
 
template<class T , class P >
shambase::DistributedData< T > shamalgs::collective::fetch_all_storeload (shambase::DistributedData< T > &src, std::vector< P > local_ids, std::vector< P > global_ids, std::function< u64(P)> id_getter)
 global ids = allgatherv(local_ids)
 

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

Typedef Documentation

◆ SerializedDDataComm

Definition at line 35 of file distributedDataComm.hpp.

Function Documentation

◆ fetch_all_simple()

template<class T , class P >
shambase::DistributedData< T > shamalgs::collective::fetch_all_simple ( shambase::DistributedData< T > &  src,
std::vector< P >  local_ids,
std::vector< P >  global_ids,
std::function< u64(P)>  id_getter 
)

global ids = allgatherv(local_ids)

Template Parameters
T
Parameters
src
local_ids
global_ids
Returns
shambase::DistributedData<T>

Definition at line 228 of file distributedDataComm.hpp.

+ Here is the call graph for this function:

◆ fetch_all_storeload()

template<class T , class P >
shambase::DistributedData< T > shamalgs::collective::fetch_all_storeload ( shambase::DistributedData< T > &  src,
std::vector< P >  local_ids,
std::vector< P >  global_ids,
std::function< u64(P)>  id_getter 
)

global ids = allgatherv(local_ids)

Template Parameters
T
Parameters
src
local_ids
global_ids
Returns
shambase::DistributedData<T>

Definition at line 259 of file distributedDataComm.hpp.

+ Here is the call graph for this function:

◆ serialize_sparse_comm()

template<class T >
void shamalgs::collective::serialize_sparse_comm ( std::shared_ptr< sham::DeviceScheduler dev_sched,
shambase::DistributedDataShared< T > &&  send_distrib_data,
shambase::DistributedDataShared< T > &  recv_distrib_data,
std::function< i32(u64)>  rank_getter,
std::function< sham::DeviceBuffer< u8 >(T &)>  serialize,
std::function< T(sham::DeviceBuffer< u8 > &&)>  deserialize,
DDSCommCache cache,
std::optional< SparseCommTable comm_table = {} 
)
inline

Definition at line 174 of file distributedDataComm.hpp.