Sierra Toolkit Version of the Day
sierra::MPI::ReduceInterface Struct Reference

Interface class ReduceInterface specifies the required virtual functions for the aggregated type and operation operator. The aggregated reduction operator allows a single MPI operation to perform many operations on many types. More...

#include <MPI.hpp>

Inheritance diagram for sierra::MPI::ReduceInterface:

List of all members.

Public Member Functions

 ReduceInterface ()
virtual ~ReduceInterface ()
virtual void size (void *&inbuf) const =0
 Member function size returns the size in bytes needed to store the data for the reduction operation of this interface. The inbuf parameter should be advanced to provide enough aligned space for the data of the reduction.
virtual void copyin (void *&inbuf) const =0
 Member function copyin copies the data from the reduction interface to the inbuf pointer reference. The pointer should be advanced to point just beyond the space of the data. Be sure to align the pointer before storing the first element of data.
virtual void copyout (void *&outbuf) const =0
 Member function copyin copies the data from outbuf pointer reference to the reduction interface data. The pointer should be advanced to point just beyond the space of the data. Be sure to align the pointer before retrieving the first element of data.
virtual void op (void *&inbuf, void *&outbuf) const =0
 Member function op executes the operation on the data at inbuf pointer reference and outbuf pointer reference and placing the result in outbuf pointer reference. The pointers should be advanced to point just beyond the space of the correspondingdata. Be sure to align the pointer before retrieving the first element of data.

Detailed Description

Interface class ReduceInterface specifies the required virtual functions for the aggregated type and operation operator. The aggregated reduction operator allows a single MPI operation to perform many operations on many types.

This is accomplished by the creation of a user MPI op, which consists of a vector of this interface. This vector is used to first size the data, then to create source and destination buffers, copy the source data into the source buffer, perform the operation on each piece of data from the source to the destination buffer and finally copy the destination buffer to destination data.

Definition at line 479 of file MPI.hpp.


Constructor & Destructor Documentation

sierra::MPI::ReduceInterface::ReduceInterface ( ) [inline]

Creates a new ReduceInterface instance.

Definition at line 484 of file MPI.hpp.

virtual sierra::MPI::ReduceInterface::~ReduceInterface ( ) [inline, virtual]

Destroys a ReduceInterface instance.

Definition at line 491 of file MPI.hpp.


Member Function Documentation

virtual void sierra::MPI::ReduceInterface::size ( void *&  inbuf) const [pure virtual]

Member function size returns the size in bytes needed to store the data for the reduction operation of this interface. The inbuf parameter should be advanced to provide enough aligned space for the data of the reduction.

Parameters:
inbufa void reference to a pointer to the be advanced by the size needed to store the data for the reduction.

Implemented in sierra::MPI::Reduce< Op, LocalIt, GlobalIt >.

virtual void sierra::MPI::ReduceInterface::copyin ( void *&  inbuf) const [pure virtual]

Member function copyin copies the data from the reduction interface to the inbuf pointer reference. The pointer should be advanced to point just beyond the space of the data. Be sure to align the pointer before storing the first element of data.

Parameters:
inbufa void reference to a pointer to start placing data after alignment and should be advance to just beyond the last element of stored data.

Implemented in sierra::MPI::Reduce< Op, LocalIt, GlobalIt >.

virtual void sierra::MPI::ReduceInterface::copyout ( void *&  outbuf) const [pure virtual]

Member function copyin copies the data from outbuf pointer reference to the reduction interface data. The pointer should be advanced to point just beyond the space of the data. Be sure to align the pointer before retrieving the first element of data.

Parameters:
outbufa void reference to a pointer to start retrieving data after alignment and should be advance to just beyond the last element of retrieved data.

Implemented in sierra::MPI::Reduce< Op, LocalIt, GlobalIt >.

virtual void sierra::MPI::ReduceInterface::op ( void *&  inbuf,
void *&  outbuf 
) const [pure virtual]

Member function op executes the operation on the data at inbuf pointer reference and outbuf pointer reference and placing the result in outbuf pointer reference. The pointers should be advanced to point just beyond the space of the correspondingdata. Be sure to align the pointer before retrieving the first element of data.

Parameters:
inbufa void reference to a pointer to start retrieving data after alignment and should be advance to just beyond the last element of stored data.
outbufa void reference to a pointer to start retrieving and storing data after alignment and should be advance to just beyond the last element of retrieved data.

Implemented in sierra::MPI::Reduce< Op, LocalIt, GlobalIt >.


The documentation for this struct was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines