Implementation for the AD tool interface of a type that is no AD type. More...
#include <adToolPassive.hpp>
Public Types | |
typedef void | AdjointType |
typedef void | IndexType |
typedef void | PrimalType |
Public Types inherited from medi::ADToolInterface | |
typedef void | AdjointType |
The data type that is used for the adjoint variables. | |
typedef void | IndexType |
The data type from the AD tool for the identification of AD variables. | |
typedef void | ModifiedType |
The type that is send through the modified buffers. | |
typedef void | PrimalType |
The data type used for the floating point data. | |
typedef void | Type |
The actual type that the AD implementation uses. | |
Public Member Functions | |
void | addToolAction (HandleBase *h) const |
Register the handle so that the AD tool can evaluate it in the reverse sweep. | |
ADToolPassive (MPI_Datatype primalType, MPI_Datatype adjointType) | |
AMPI_Op | convertOperator (AMPI_Op op) const |
Convert the mpi intrinsic operators like MPI_SUM to the specific one for the AD tool. | |
void | createIndexTypeBuffer (IndexType *&buf, size_t size) const |
Create an array for the index variables. | |
void | createPrimalTypeBuffer (PrimalType *&buf, size_t size) const |
Create an array for the passive variables. | |
void | deleteIndexTypeBuffer (IndexType *&buf) const |
Delete the array of the index variables. | |
void | deletePrimalTypeBuffer (PrimalType *&buf) const |
Delete the array of the passive variables. | |
bool | isActiveType () const |
If this AD interface represents an AD type. | |
bool | isHandleRequired () const |
The handle needs to be created if an adjoint action is required by the AD tool. | |
bool | isModifiedBufferRequired () const |
Indicates if the AD tool needs to modify the buffer in order to send the correct data. | |
bool | isOldPrimalsRequired () const |
Indicates if MeDiPack needs store the overwritten primal values for the AD tool. | |
void | startAssembly (HandleBase *h) const |
Indicates to the AD tool that an adjoint action is in the progress of beeing recorded. | |
void | stopAssembly (HandleBase *h) const |
Indicates to the AD tool that an adjoint action is beeing finished. | |
Public Member Functions inherited from medi::ADToolBase< ADToolPassive, void, void, void > | |
ADToolBase (MPI_Datatype primalMpiType, MPI_Datatype adjointMpiType) | |
Construct the type safe wrapper. | |
Public Member Functions inherited from medi::ADToolInterface | |
ADToolInterface (MPI_Datatype primalMpiType, MPI_Datatype adjointMpiType) | |
Create an interface for the AD type. | |
MPI_Datatype | getAdjointMpiType () const |
The mpi data type for the adjoint type. | |
MPI_Datatype | getPrimalMpiType () const |
The mpi data type for the primal type. | |
virtual | ~ADToolInterface () |
Implementation for the AD tool interface of a type that is no AD type.
All methods in this implementation contain no logic.
typedef void medi::ADToolPassive::AdjointType |
typedef void medi::ADToolPassive::IndexType |
typedef void medi::ADToolPassive::PrimalType |
|
inline |
|
inlinevirtual |
Register the handle so that the AD tool can evaluate it in the reverse sweep.
The AD tool needs to store the handle and do the following call:
h->func(h);
This call will evaluate the necessary adjoint actions by MeDiPack.
The handle pointer is now in the possion of the AD tool and the AD tool needs to delete the handle with the call
delete h;
The virtual function call will take care of the proper deletion of the MeDiPack structure.
[in,out] | h | The handle that is used by MeDiPack for the data storing. |
Implements medi::ADToolInterface.
Convert the mpi intrinsic operators like MPI_SUM to the specific one for the AD tool.
[in] | op | The intrinsic mpi operator. |
Implements medi::ADToolInterface.
|
inlinevirtual |
Create an array for the index variables.
[out] | buf | The pointer for the buffer. |
[in] | size | The size of the buffer. |
Reimplemented from medi::ADToolBase< ADToolPassive, void, void, void >.
|
inlinevirtual |
Create an array for the passive variables.
[out] | buf | The pointer for the buffer. |
[in] | size | The size of the buffer. |
Reimplemented from medi::ADToolBase< ADToolPassive, void, void, void >.
|
inlinevirtual |
Delete the array of the index variables.
[in,out] | buf | The pointer for the buffer. |
Reimplemented from medi::ADToolBase< ADToolPassive, void, void, void >.
|
inlinevirtual |
Delete the array of the passive variables.
[in,out] | buf | The pointer for the buffer. |
Reimplemented from medi::ADToolBase< ADToolPassive, void, void, void >.
|
inlinevirtual |
If this AD interface represents an AD type.
Implements medi::ADToolInterface.
|
inlinevirtual |
The handle needs to be created if an adjoint action is required by the AD tool.
Implements medi::ADToolInterface.
|
inlinevirtual |
Indicates if the AD tool needs to modify the buffer in order to send the correct data.
Implements medi::ADToolInterface.
|
inlinevirtual |
Indicates if MeDiPack needs store the overwritten primal values for the AD tool.
Implements medi::ADToolInterface.
|
inlinevirtual |
Indicates to the AD tool that an adjoint action is in the progress of beeing recorded.
[in,out] | h | The handle that is used by MeDiPack for the data storing. |
Implements medi::ADToolInterface.
|
inlinevirtual |
Indicates to the AD tool that an adjoint action is beeing finished.
[in,out] | h | The handle that is used by MeDiPack for the data storing. |
Implements medi::ADToolInterface.