Sierra Toolkit
Version of the Day
|
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>
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. More... | |
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. More... | |
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. More... | |
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. More... | |
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.
|
inline |
Creates a new ReduceInterface instance.
|
inlinevirtual |
Destroys a ReduceInterface instance.
|
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.
inbuf | a 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 >.
|
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.
inbuf | a 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 >.
|
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.
outbuf | a 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 >.
|
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.
inbuf | a void reference to a pointer to start retrieving data after alignment and should be advance to just beyond the last element of stored data. |
outbuf | a 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 >.