Shamrock 2025.10.0
Astrophysical Code
Loading...
Searching...
No Matches
Namespaces | Functions
reduction.hpp File Reference
#include "shambase/exception.hpp"
#include "shamalgs/primitives/flatten.hpp"
#include "shambackends/DeviceBuffer.hpp"
#include "shambackends/SyclMpiTypes.hpp"
#include "shambackends/typeAliasVec.hpp"
#include "shamcomm/mpi.hpp"
#include "shamcomm/mpiErrorCheck.hpp"
#include "shamcomm/worldInfo.hpp"
#include "shamcomm/wrapper.hpp"
#include <type_traits>
#include <stdexcept>
#include <utility>
+ Include dependency graph for reduction.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 >
shamalgs::collective::allreduce_one (T a, MPI_Op op, MPI_Comm comm)
 
template<class T , int n>
sycl::vec< T, n > shamalgs::collective::allreduce_one (sycl::vec< T, n > a, MPI_Op op, MPI_Comm comm)
 
template<class T >
shamalgs::collective::allreduce_sum (T a)
 
template<class T >
shamalgs::collective::allreduce_min (T a)
 
template<class T >
shamalgs::collective::allreduce_max (T a)
 
template<class T >
std::pair< T, T > shamalgs::collective::allreduce_bounds (std::pair< T, T > bounds)
 
template<class T , sham::USMKindTarget target>
void shamalgs::collective::reduce_buffer_in_place_sum (sham::DeviceBuffer< T, target > &field, MPI_Comm comm)
 
template<class T >
std::vector< T > shamalgs::collective::gather (T a, MPI_Comm comm=MPI_COMM_WORLD, int root=0)
 

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

Function Documentation

◆ allreduce_bounds()

template<class T >
std::pair< T, T > shamalgs::collective::allreduce_bounds ( std::pair< T, T >  bounds)
inline

Definition at line 73 of file reduction.hpp.

◆ allreduce_max()

template<class T >
T shamalgs::collective::allreduce_max ( a)
inline

Definition at line 68 of file reduction.hpp.

◆ allreduce_min()

template<class T >
T shamalgs::collective::allreduce_min ( a)
inline

Definition at line 63 of file reduction.hpp.

◆ allreduce_one() [1/2]

template<class T , int n>
sycl::vec< T, n > shamalgs::collective::allreduce_one ( sycl::vec< T, n >  a,
MPI_Op  op,
MPI_Comm  comm 
)
inline

Definition at line 42 of file reduction.hpp.

◆ allreduce_one() [2/2]

template<class T >
T shamalgs::collective::allreduce_one ( a,
MPI_Op  op,
MPI_Comm  comm 
)
inline

Definition at line 35 of file reduction.hpp.

◆ allreduce_sum()

template<class T >
T shamalgs::collective::allreduce_sum ( a)
inline

Definition at line 58 of file reduction.hpp.

◆ gather()

template<class T >
std::vector< T > shamalgs::collective::gather ( a,
MPI_Comm  comm = MPI_COMM_WORLD,
int  root = 0 
)
inline

Definition at line 128 of file reduction.hpp.

◆ reduce_buffer_in_place_sum()

template<class T , sham::USMKindTarget target>
void shamalgs::collective::reduce_buffer_in_place_sum ( sham::DeviceBuffer< T, target > &  field,
MPI_Comm  comm 
)
inline

Definition at line 78 of file reduction.hpp.