Write a tape to a file using a writer from the codi::TapeWriterInterface. When reading a stored tape, create a primal or a Jacobian statement on the tape. More...
#include <readWriteTapeInterface.hpp>
Public Types | |
using | EvalHandle = void* |
See PrimalValueTapeTypes. | |
using | Gradient = T_Gradient |
See ReadWriteTapeInterface. | |
using | Identifier = T_Identifier |
See ReadWriteTapeInterface. | |
using | Position = T_Position |
See ReadWriteTapeInterface. | |
using | Real = T_Real |
See ReadWriteTapeInterface. | |
using | Type = int |
Provided by the template arguments in the writeTape methods. | |
using | WriterInterface = TapeWriterInterface<Type> |
Writer interface. | |
using | WriterInterfaceUniquePtr = std::unique_ptr<TapeWriterInterface<Type>> |
Unique pointer to writer. | |
Public Member Functions | |
Tape writing | |
template<typename Type > | |
void | writeTape (WriterInterfaceUniquePtr writer) |
For full-tape writers using a smart pointer. | |
template<typename Type > | |
void | writeTape (WriterInterfaceUniquePtr writer, Position const &start, Position const &end) |
For partial-tape writers using a smart pointer. | |
template<typename Type > | |
void | writeTape (WriterInterface &writeToFileRef) |
For full-tape writers using a manually generated writers. | |
template<typename Type > | |
void | writeTape (WriterInterface &writeToFileRef, Position const &start, Position const &end) |
For partial-tape writers using a manually generated writers. | |
template<typename Type > | |
void | writeTape (WriterInterface *writer, Position const &start, Position const &end) |
For full or partial tapes using a pointer to the writer. | |
Tape Reading | |
void | createStatementManual (Real const &lhsValue, Identifier &lhsIndex, Config::ArgumentSize const &size, Real const *jacobians, Identifier const *rhsIdentifiers) |
void | createStatementManual (Identifier const &lhsIndex, Real const &lhsValue, Config::ArgumentSize const &nActiveValues, Identifier const *const rhsIdentifiers, Config::ArgumentSize const &nPassiveValues, Real const *const rhsPrimals, Config::ArgumentSize const &nConstants, Real const *const rhsConstant, EvalHandle const &evalHandle) |
Write a tape to a file using a writer from the codi::TapeWriterInterface. When reading a stored tape, create a primal or a Jacobian statement on the tape.
See codi::TapeWriterInterface and codi::TapeReaderInterface for details.
T_Real | The computation type of a tape, usually chosen as ActiveType::Real. |
T_Gradient | The gradient type of a tape usually, chosen as ActiveType::Gradient. |
T_Identifier | The adjoint/tangent identification type of a tape, usually chosen as ActiveType::Identifier. |
T_Position | Global tape position, usually chosen as Tape::Position. |
void codi::ReadWriteTapeInterface< T_Real, T_Gradient, T_Identifier, T_Position >::createStatementManual | ( | Identifier const & | lhsIndex, |
Real const & | lhsValue, | ||
Config::ArgumentSize const & | nActiveValues, | ||
Identifier const *const | rhsIdentifiers, | ||
Config::ArgumentSize const & | nPassiveValues, | ||
Real const *const | rhsPrimals, | ||
Config::ArgumentSize const & | nConstants, | ||
Real const *const | rhsConstant, | ||
EvalHandle const & | evalHandle ) |
Initialize the statement and the rhs vectors from a file. It is especially important that the Identifiers are valid when using this method. This overload is used for Primal tapes.
void codi::ReadWriteTapeInterface< T_Real, T_Gradient, T_Identifier, T_Position >::createStatementManual | ( | Real const & | lhsValue, |
Identifier & | lhsIndex, | ||
Config::ArgumentSize const & | size, | ||
Real const * | jacobians, | ||
Identifier const * | rhsIdentifiers ) |
Initialize the statement from a file. It is especially important that the lhsIndex is valid when using this method. This overload is used for Jacobian tapes.