|
|
void | startPushStatement () |
| Initialize all data for the push of a statement.
|
|
void | pushArgument (Type const &arg, Real const &jacobian) |
| Add the Jacobian of an argument of the statement.
|
|
void | endPushStatement (Type &lhs, Real const &primal) |
| Finish the push of a statement. Performs lhs = primal and cleans up all data.
|
|
void | endPushStatement (Type &lhs, Real const &primal) |
| Finish the push of a statement. Performs lhs = primal and cleans up all data.
|
|
void | pushArgument (Type const &arg, Real const &jacobian) |
| Add the Jacobian of an argument of the statement.
|
|
void | startPushStatement () |
| Initialize all data for the push of a statement.
|
|
void | pushStatement (Type &lhs, Real const &primal, ArgIter const startArg, ArgIter const endArg, JacobiIter const startJac) |
| Push a complete statement where the Jacobians and arguments are provided as iterator objects.
|
|
void | pushStatement (Type &lhs, Real const &primal, ArgVector const &arguments, JacobiVector const &jacobians, size_t const size) |
| Push a complete statement where the Jacobians and arguments are provided as arrays.
|
|
template<typename T_Type, typename = void>
struct codi::StatementPushHelper< T_Type, typename >
Add statements to the tape where the Jacobians are computed manually.
This helper class can be used to optimize the storage of a statement or to handle involved functions that cannot be handled with CoDiPack.
The three basic use cases are:
y[0] = x * x;
std::vector<Real> valuesIter;
std::vector<double> jacobiansIter;
valuesIter.push_back(x);
jacobiansIter.push_back(2.0 * x.value());
sh.
pushStatement(y[2], x.value() * x.value(), valuesIter.begin(), valuesIter.end(), jacobiansIter.begin());
Real valuesArray[] = {x};
double jacobiansArray[] = {2.0 * x.
value()};
sh.
pushStatement(y[3], x.value() * x.value(), valuesArray, jacobiansArray, 1);
After a statement is pushed, the helper can be used again for the next statement.
- Template Parameters
-
T_Type | The CoDiPack type on whose tape the statements are pushed. |