fpmas 1.6
Public Member Functions | List of all members
fpmas::io::Reduce< T, BinaryOp, Mpi >::Single Class Reference

#include <output.h>

Public Member Functions

 Single (api::communication::MpiCommunicator &comm, int root, const Watcher< T > &watcher, const Params &)
 
operator() ()
 

Detailed Description

template<typename T, typename BinaryOp = std::plus<T>, template< typename > class Mpi = communication::TypedMpi>
class fpmas::io::Reduce< T, BinaryOp, Mpi >::Single

Single mode for the Reduce operation.

Result is gathered only at root.

Constructor & Destructor Documentation

◆ Single()

template<typename T , typename BinaryOp = std::plus<T>, template< typename > class Mpi = communication::TypedMpi>
fpmas::io::Reduce< T, BinaryOp, Mpi >::Single::Single ( api::communication::MpiCommunicator comm,
int  root,
const Watcher< T > &  watcher,
const Params  
)
inline

Reduce::Single constructor.

Parameters
commMPI communicator
rootrank of the process where data is fetched
watcherlocal watcher

Member Function Documentation

◆ operator()()

template<typename T , typename BinaryOp = std::plus<T>, template< typename > class Mpi = communication::TypedMpi>
T fpmas::io::Reduce< T, BinaryOp, Mpi >::Single::operator() ( )
inline

Applies the fpmas::communication::reduce() operation on data returned by watcher().

Reduced data is returned at root. On other processes, the local data returned by watcher() is returned.

Returns
fetched data

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