MeDiPack  1.2.2
A Message Differentiation Package
SciComp TU Kaiserslautern
Loading...
Searching...
No Matches
medi::MpiTypePassive< T > Class Template Referencefinal

#include <typePassive.hpp>

Inheritance diagram for medi::MpiTypePassive< T >:

Public Types

typedef void IndexType
 
typedef T ModifiedType
 
typedef void PrimalType
 
typedef ADToolPassive Tool
 
typedef T Type
 
- Public Types inherited from medi::MpiTypeBase< MpiTypePassive< T >, T, T, ADToolPassive >
typedef ADToolB::IndexType IndexTypeB
 
typedef ADToolB::PrimalType PrimalTypeB
 
- Public Types inherited from medi::MpiTypeInterface
typedef void AdjointType
 
typedef void IndexType
 The type of the identifiers for the AD tool. More...
 
typedef void ModifiedType
 The type of the modified buffer data which is send over the network. More...
 
typedef void PrimalType
 The type of the floating point values which are handled by the AD tool. More...
 
typedef void Type
 The type of the user data which is represented by this interface. More...
 

Public Member Functions

void clearIndices (Type *buf, size_t bufOffset, int elements) const
 
MpiTypePassiveclone () const
 Creates a clone of the mpi type also calling MPI_Type_dub. More...
 
int computeActiveElements (const int count) const
 Get the number of active elements that are contained in count versions of the type. More...
 
void copy (Type *from, size_t fromOffset, Type *to, size_t toOffset, int count) const
 
void copyFromModifiedBuffer (Type *buf, size_t bufOffset, const ModifiedType *bufMod, size_t bufModOffset, int elements) const
 
void copyIntoModifiedBuffer (const Type *buf, size_t bufOffset, ModifiedType *bufMod, size_t bufModOffset, int elements) const
 
void createIndices (Type *buf, size_t bufOffset, IndexType *indices, size_t bufModOffset, int elements) const
 
void createModifiedTypeBuffer (ModifiedType *&buf, size_t size) const
 
void createTypeBuffer (Type *&buf, size_t size) const
 
void deleteModifiedTypeBuffer (ModifiedType *&buf) const
 
void deleteTypeBuffer (Type *&buf, size_t size) const
 
void freeType (Type *buf, size_t bufOffset, int elements) const
 
const ToolgetADTool () const
 Get the AD tool that handled the AD specifics. More...
 
void getIndices (const Type *buf, size_t bufOffset, IndexType *indices, size_t bufModOffset, int elements) const
 
void getValues (const Type *buf, size_t bufOffset, PrimalType *primals, size_t bufModOffset, int elements) const
 
void initializeType (Type *buf, size_t bufOffset, int elements) const
 
bool isModifiedBufferRequired () const
 Tell the functions if the underlying AD tool requires new send/recv buffers or if the original buffers can be used. More...
 
 MpiTypePassive (MPI_Datatype type)
 
void performReduce (Type *buf, Type *target, int count, AMPI_Op op, int ranks) const
 
void registerValue (Type *buf, size_t bufOffset, IndexType *indices, PrimalType *oldPrimals, size_t bufModOffset, int elements) const
 
 ~MpiTypePassive ()
 
- Public Member Functions inherited from medi::MpiTypeBase< MpiTypePassive< T >, T, T, ADToolPassive >
void clearIndices (void *buf, size_t bufOffset, int elements) const
 Clear the AD types in the buffer such that they can be overwritten. More...
 
int computeActiveElements (const int count) const
 Get the number of active elements that are contained in count versions of the type. More...
 
void copy (void *from, size_t fromOffset, void *to, size_t toOffset, int count) const
 Copy the elements of one buffer into the other. More...
 
void copyFromModifiedBuffer (void *buf, size_t bufOffset, const void *bufMod, size_t bufModOffset, int elements) const
 Copy all data from the modified buffer and perform the special handling for the AD type. More...
 
void copyIntoModifiedBuffer (const void *buf, size_t bufOffset, void *bufMod, size_t bufModOffset, int elements) const
 Copy all data into the modified buffer and perform the special handling for the AD type. More...
 
void createIndices (void *buf, size_t bufOffset, void *indices, size_t bufModOffset, int elements) const
 Create indices for a reciving buffer if necessary. More...
 
void createModifiedTypeBuffer (void *&buf, size_t size) const
 Create a temporary buffer of the modified type that this interface represents. More...
 
void createTypeBuffer (void *&buf, size_t size) const
 Create a temporary buffer of the type that this interface represents. More...
 
void deleteModifiedTypeBuffer (void *&buf) const
 Delete the temporary buffer for the modified types. More...
 
void deleteTypeBuffer (void *&buf, size_t size) const
 Delete the temporary buffer. More...
 
void freeType (void *buf, size_t bufOffset, int elements) const
 Destroy the types in the buffer. More...
 
void getIndices (const void *buf, size_t bufOffset, void *indices, size_t bufModOffset, int elements) const
 Get all the AD identifiers from all AD types in the buffer. More...
 
void getValues (const void *buf, size_t bufOffset, void *primals, size_t bufModOffset, int elements) const
 Get the primal values from the AD types. More...
 
void initializeType (void *buf, size_t bufOffset, int elements) const
 Initialize the types in the buffer. More...
 
 MpiTypeBase (MPI_Datatype mpiType, MPI_Datatype modifiedMpiType)
 
void performReduce (void *buf, void *target, int count, AMPI_Op op, int ranks) const
 Perform a local reduce operation. More...
 
void registerValue (void *buf, size_t bufOffset, void *indices, void *oldPrimals, size_t bufModOffset, int elements) const
 Register all the AD values on the new machine. More...
 
- Public Member Functions inherited from medi::MpiTypeInterface
virtual void clearIndices (void *buf, size_t bufOffset, int elements) const =0
 Clear the AD types in the buffer such that they can be overwritten. More...
 
virtual MpiTypeInterfaceclone () const =0
 Creates a clone of the mpi type also calling MPI_Type_dub. More...
 
virtual int computeActiveElements (const int count) const =0
 Get the number of active elements that are contained in count versions of the type. More...
 
virtual void copy (void *from, size_t fromOffset, void *to, size_t toOffset, int count) const =0
 Copy the elements of one buffer into the other. More...
 
virtual void copyFromModifiedBuffer (void *buf, size_t bufOffset, const void *bufMod, size_t bufModOffset, int elements) const =0
 Copy all data from the modified buffer and perform the special handling for the AD type. More...
 
virtual void copyIntoModifiedBuffer (const void *buf, size_t bufOffset, void *bufMod, size_t bufModOffset, int elements) const =0
 Copy all data into the modified buffer and perform the special handling for the AD type. More...
 
virtual void createIndices (void *buf, size_t bufOffset, void *indices, size_t bufModOffset, int elements) const =0
 Create indices for a reciving buffer if necessary. More...
 
virtual void createModifiedTypeBuffer (void *&buf, size_t size) const =0
 Create a temporary buffer of the modified type that this interface represents. More...
 
virtual void createTypeBuffer (void *&buf, size_t size) const =0
 Create a temporary buffer of the type that this interface represents. More...
 
virtual void deleteModifiedTypeBuffer (void *&buf) const =0
 Delete the temporary buffer for the modified types. More...
 
virtual void deleteTypeBuffer (void *&buf, size_t size) const =0
 Delete the temporary buffer. More...
 
virtual void freeType (Type *buf, size_t bufOffset, int elements) const =0
 Destroy the types in the buffer. More...
 
virtual const ADToolInterfacegetADTool () const =0
 Get the AD tool that handled the AD specifics. More...
 
virtual void getIndices (const void *buf, size_t bufOffset, void *indices, size_t bufModOffset, int elements) const =0
 Get all the AD identifiers from all AD types in the buffer. More...
 
MPI_Datatype getModifiedMpiType () const
 Return the MPI type for the modified data. More...
 
MPI_Datatype getMpiType () const
 Return the MPI type for the data that this interface represents. More...
 
virtual void getValues (const void *buf, size_t bufOffset, void *primals, size_t bufModOffset, int elements) const =0
 Get the primal values from the AD types. More...
 
virtual void initializeType (Type *buf, size_t bufOffset, int elements) const =0
 Initialize the types in the buffer. More...
 
virtual bool isModifiedBufferRequired () const =0
 Tell the functions if the underlying AD tool requires new send/recv buffers or if the original buffers can be used. More...
 
 MpiTypeInterface (MPI_Datatype mpiType, MPI_Datatype modifiedMpiType)
 Wrapper interface for MPI types in communications. See the class description for details. More...
 
virtual void performReduce (void *buf, void *target, int count, AMPI_Op op, int ranks) const =0
 Perform a local reduce operation. More...
 
virtual void registerValue (void *buf, size_t bufOffset, void *indices, void *oldPrimals, size_t bufModOffset, int elements) const =0
 Register all the AD values on the new machine. More...
 
virtual ~MpiTypeInterface ()
 Virtual destructor. More...
 

Public Attributes

Tool adTool
 
bool isClone
 

Additional Inherited Members

- Protected Member Functions inherited from medi::MpiTypeInterface
void setMpiTypes (MPI_Datatype mpiType, MPI_Datatype modifiedMpiType)
 Helper method for extending classes to set the types after the initial construction. More...
 

Member Typedef Documentation

◆ IndexType

template<typename T >
typedef void medi::MpiTypePassive< T >::IndexType

◆ ModifiedType

template<typename T >
typedef T medi::MpiTypePassive< T >::ModifiedType

◆ PrimalType

template<typename T >
typedef void medi::MpiTypePassive< T >::PrimalType

◆ Tool

template<typename T >
typedef ADToolPassive medi::MpiTypePassive< T >::Tool

◆ Type

template<typename T >
typedef T medi::MpiTypePassive< T >::Type

Constructor & Destructor Documentation

◆ MpiTypePassive()

template<typename T >
medi::MpiTypePassive< T >::MpiTypePassive ( MPI_Datatype  type)
inline

◆ ~MpiTypePassive()

template<typename T >
medi::MpiTypePassive< T >::~MpiTypePassive ( )
inline

Member Function Documentation

◆ clearIndices()

template<typename T >
void medi::MpiTypePassive< T >::clearIndices ( Type buf,
size_t  bufOffset,
int  elements 
) const
inline

◆ clone()

template<typename T >
MpiTypePassive * medi::MpiTypePassive< T >::clone ( ) const
inlinevirtual

Creates a clone of the mpi type also calling MPI_Type_dub.

Returns
The cloned interface.

Implements medi::MpiTypeInterface.

◆ computeActiveElements()

template<typename T >
int medi::MpiTypePassive< T >::computeActiveElements ( const int  count) const
inlinevirtual

Get the number of active elements that are contained in count versions of the type.

Parameters
[in]countThe number of times this type is contained in the buffer.
Returns
The number of active elements in the buffer.

Implements medi::MpiTypeInterface.

◆ copy()

template<typename T >
void medi::MpiTypePassive< T >::copy ( Type from,
size_t  fromOffset,
Type to,
size_t  toOffset,
int  count 
) const
inline

◆ copyFromModifiedBuffer()

template<typename T >
void medi::MpiTypePassive< T >::copyFromModifiedBuffer ( Type buf,
size_t  bufOffset,
const ModifiedType bufMod,
size_t  bufModOffset,
int  elements 
) const
inline

◆ copyIntoModifiedBuffer()

template<typename T >
void medi::MpiTypePassive< T >::copyIntoModifiedBuffer ( const Type buf,
size_t  bufOffset,
ModifiedType bufMod,
size_t  bufModOffset,
int  elements 
) const
inline

◆ createIndices()

template<typename T >
void medi::MpiTypePassive< T >::createIndices ( Type buf,
size_t  bufOffset,
IndexType indices,
size_t  bufModOffset,
int  elements 
) const
inline

◆ createModifiedTypeBuffer()

template<typename T >
void medi::MpiTypePassive< T >::createModifiedTypeBuffer ( ModifiedType *&  buf,
size_t  size 
) const
inline

◆ createTypeBuffer()

template<typename T >
void medi::MpiTypePassive< T >::createTypeBuffer ( Type *&  buf,
size_t  size 
) const
inline

◆ deleteModifiedTypeBuffer()

template<typename T >
void medi::MpiTypePassive< T >::deleteModifiedTypeBuffer ( ModifiedType *&  buf) const
inline

◆ deleteTypeBuffer()

template<typename T >
void medi::MpiTypePassive< T >::deleteTypeBuffer ( Type *&  buf,
size_t  size 
) const
inline

◆ freeType()

template<typename T >
void medi::MpiTypePassive< T >::freeType ( Type buf,
size_t  bufOffset,
int  elements 
) const
inline

◆ getADTool()

template<typename T >
const Tool & medi::MpiTypePassive< T >::getADTool ( ) const
inlinevirtual

Get the AD tool that handled the AD specifics.

Returns
The handle to the AD tool

Implements medi::MpiTypeInterface.

◆ getIndices()

template<typename T >
void medi::MpiTypePassive< T >::getIndices ( const Type buf,
size_t  bufOffset,
IndexType indices,
size_t  bufModOffset,
int  elements 
) const
inline

◆ getValues()

template<typename T >
void medi::MpiTypePassive< T >::getValues ( const Type buf,
size_t  bufOffset,
PrimalType primals,
size_t  bufModOffset,
int  elements 
) const
inline

◆ initializeType()

template<typename T >
void medi::MpiTypePassive< T >::initializeType ( Type buf,
size_t  bufOffset,
int  elements 
) const
inline

◆ isModifiedBufferRequired()

template<typename T >
bool medi::MpiTypePassive< T >::isModifiedBufferRequired ( ) const
inlinevirtual

Tell the functions if the underlying AD tool requires new send/recv buffers or if the original buffers can be used.

Returns
true if new send/recv buffers are required.

Implements medi::MpiTypeInterface.

◆ performReduce()

template<typename T >
void medi::MpiTypePassive< T >::performReduce ( Type buf,
Type target,
int  count,
AMPI_Op  op,
int  ranks 
) const
inline

◆ registerValue()

template<typename T >
void medi::MpiTypePassive< T >::registerValue ( Type buf,
size_t  bufOffset,
IndexType indices,
PrimalType oldPrimals,
size_t  bufModOffset,
int  elements 
) const
inline

Member Data Documentation

◆ adTool

template<typename T >
Tool medi::MpiTypePassive< T >::adTool

◆ isClone

template<typename T >
bool medi::MpiTypePassive< T >::isClone

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