#include <adjointInterface.hpp>
|
virtual void | combineAdjoints (void *buf, const int elements, const int ranks) const =0 |
| Perform a reduction in the first element of the buffer.
|
|
virtual int | computeElements (int elements) const =0 |
| Compute the number of active types in the buffer.
|
|
virtual void | createAdjointTypeBuffer (void *&buf, size_t size) const =0 |
| Create an array for the adjoint variables.
|
|
virtual void | createPrimalTypeBuffer (void *&buf, size_t size) const =0 |
| Create an array for the primal variables.
|
|
virtual void | deleteAdjointTypeBuffer (void *&buf) const =0 |
| Delete the array of the adjoint variables.
|
|
virtual void | deletePrimalTypeBuffer (void *&buf) const =0 |
| Delete the array of the primal variables.
|
|
virtual void | getAdjoints (const void *indices, void *adjoints, int elements) const =0 |
| Get the adjoints for the indices from the AD tool.
|
|
virtual void | getPrimals (const void *indices, const void *primals, int elements) const =0 |
| Get the primal values from the AD tool.
|
|
virtual int | getVectorSize () const =0 |
| The vector size for the current evaluation.
|
|
virtual void | setPrimals (const void *indices, const void *primals, int elements) const =0 |
| Set the primal values on the AD tool.
|
|
virtual void | updateAdjoints (const void *indices, const void *adjoints, int elements) const =0 |
| Add the adjoint varaibles to the ones in the AD tool. That is the AD tool should perform the operation:
|
|
◆ combineAdjoints()
virtual void medi::AdjointInterface::combineAdjoints |
( |
void * | buf, |
|
|
const int | elements, |
|
|
const int | ranks ) const |
|
pure virtual |
Perform a reduction in the first element of the buffer.
- Parameters
-
[in,out] | buf | The buffer with adjoint values its size is elements * ranks |
[in] | elements | The number of elements in the vectors. |
[in] | ranks | The number of ranks in the communication. |
◆ computeElements()
virtual int medi::AdjointInterface::computeElements |
( |
int | elements | ) |
const |
|
pure virtual |
Compute the number of active types in the buffer.
- Parameters
-
[in] | elements | The number of elements in the buffer. |
- Returns
- The number of active types in the buffer.
◆ createAdjointTypeBuffer()
virtual void medi::AdjointInterface::createAdjointTypeBuffer |
( |
void *& | buf, |
|
|
size_t | size ) const |
|
pure virtual |
Create an array for the adjoint variables.
- Parameters
-
[out] | buf | The pointer for the buffer. |
[in] | size | The size of the buffer. |
◆ createPrimalTypeBuffer()
virtual void medi::AdjointInterface::createPrimalTypeBuffer |
( |
void *& | buf, |
|
|
size_t | size ) const |
|
pure virtual |
Create an array for the primal variables.
- Parameters
-
[out] | buf | The pointer for the buffer. |
[in] | size | The size of the buffer. |
◆ deleteAdjointTypeBuffer()
virtual void medi::AdjointInterface::deleteAdjointTypeBuffer |
( |
void *& | buf | ) |
const |
|
pure virtual |
Delete the array of the adjoint variables.
- Parameters
-
[in,out] | buf | The pointer for the buffer. |
◆ deletePrimalTypeBuffer()
virtual void medi::AdjointInterface::deletePrimalTypeBuffer |
( |
void *& | buf | ) |
const |
|
pure virtual |
Delete the array of the primal variables.
- Parameters
-
[in,out] | buf | The pointer for the buffer. |
◆ getAdjoints()
virtual void medi::AdjointInterface::getAdjoints |
( |
const void * | indices, |
|
|
void * | adjoints, |
|
|
int | elements ) const |
|
pure virtual |
Get the adjoints for the indices from the AD tool.
- Parameters
-
[in] | indices | The indices from the AD tool for the variables in the buffer. |
[out] | adjoints | The vector for the adjoint variables. |
[in] | elements | The number of elements in the vectors. |
◆ getPrimals()
virtual void medi::AdjointInterface::getPrimals |
( |
const void * | indices, |
|
|
const void * | primals, |
|
|
int | elements ) const |
|
pure virtual |
Get the primal values from the AD tool.
Can be used to store the old primal values from the floating point values in the buffer.
- Parameters
-
[in] | indices | The indices from the AD tool for the variables in the buffer. |
[out] | primals | The vector with the old primal variables. |
[in] | elements | The number of elements in the vectors. |
◆ getVectorSize()
virtual int medi::AdjointInterface::getVectorSize |
( |
| ) |
const |
|
pure virtual |
The vector size for the current evaluation.
- Returns
- The vector size for the current evaluation.
◆ setPrimals()
virtual void medi::AdjointInterface::setPrimals |
( |
const void * | indices, |
|
|
const void * | primals, |
|
|
int | elements ) const |
|
pure virtual |
Set the primal values on the AD tool.
Can be used to restore the old primal values from the floating point values in the buffer.
- Parameters
-
[in] | indices | The indices from the AD tool for the variables in the buffer. |
[out] | primals | The vector with the old primal variables. |
[in] | elements | The number of elements in the vectors. |
◆ updateAdjoints()
virtual void medi::AdjointInterface::updateAdjoints |
( |
const void * | indices, |
|
|
const void * | adjoints, |
|
|
int | elements ) const |
|
pure virtual |
Add the adjoint varaibles to the ones in the AD tool. That is the AD tool should perform the operation:
internalAdjoints[indices[i]] += adjoints[i];
- Parameters
-
[in] | indices | The indices from the AD tool for the variables in the buffer. |
[out] | adjoints | The vector with the adjoint variables. |
[in] | elements | The number of elements in the vectors. |
The documentation for this class was generated from the following file: