Reads and restores a binary file for a Jacobian tape. More...
#include <jacobianBinaryReaderWriter.hpp>
Public Types | |
using | Identifier = typename Type::Identifier |
See TapeReaderInterface. | |
using | Real = typename Type::Real |
See TapeReaderInterface. | |
using | Tape = typename Type::Tape |
See TapeReaderInterface. | |
using | Type = T_Type |
See TapeReaderInterface. | |
Public Types inherited from codi::JacobianBaseTapeReader< T_Type > | |
using | Identifier = typename Type::Identifier |
See TapeReaderInterface. | |
using | Real = typename Type::Real |
See TapeReaderInterface. | |
using | Tape = typename Type::Tape |
See TapeReaderInterface. | |
using | Type = T_Type |
See TapeReaderInterface. | |
Public Types inherited from codi::CommonBaseTapeReader< T_Type > | |
using | Identifier = typename Type::Identifier |
See TapeReaderInterface. | |
using | Tape = typename Type::Tape |
See TapeReaderInterface. | |
using | Type = T_Type |
See TapeReaderInterface. | |
Public Types inherited from codi::TapeReaderInterface< T_Type > | |
using | Identifier = typename Type::Identifier |
Identifier for the internal management, e.g. int. | |
using | Real = typename Type::Real |
Primal computation type, e.g. double. | |
using | Tape = typename Type::Tape |
The tape type that is to be restored. | |
using | Type = T_Type |
The evaluation type. | |
Public Member Functions | |
JacobianBinaryTapeReader () | |
Constructor. | |
void | readFile (std::string const &name) |
This method uses the the fileName to reproduce a valid tape. | |
Public Member Functions inherited from codi::JacobianBaseTapeReader< T_Type > | |
void | registerStatement (Identifier const &lhsIdentifier, Config::ArgumentSize const &nArgs, std::vector< Identifier > const &rhsIdentifiers, std::vector< Real > const &rhsJacobians, Identifier &lowestIndex, bool &isFirstIdentifier) |
Constructor. | |
Public Member Functions inherited from codi::TapeReaderInterface< T_Type > | |
virtual | ~TapeReaderInterface () |
Destructor. | |
Public Member Functions inherited from codi::CommonReaderWriterMethods | |
CommonReaderWriterMethods () | |
Constructor. | |
CommonReaderWriterMethods (std::string const &name) | |
Constructor. | |
std::string | modifyFileName (std::string const &suffix) |
Remove the file extension and replace it with a new suffix. | |
void | openFile (FILE *&fileHandle, std::string const &name, std::string const &mode) |
Additional Inherited Members | |
Public Attributes inherited from codi::CommonBaseTapeReader< T_Type > | |
std::vector< Identifier > | inputVariables |
Stores the restored input variables from the tape file. | |
Identifier | largestIndex |
The largest index on the stored tape. | |
size_t | nInputs |
Size of the input vector. | |
size_t | nOutputs |
Size of the output vector. | |
std::vector< Identifier > | outputVariables |
Stores the restored output variables from the tape file. | |
Tape | tape |
The newly resorted tape. | |
Public Attributes inherited from codi::CommonReaderWriterMethods | |
std::string | fileName |
The base file name provided by the user. | |
Protected Member Functions inherited from codi::CommonBaseTapeReader< T_Type > | |
std::vector< Identifier > const & | getInputs () const & |
Used to get the restored inputs of the tape. | |
std::vector< Identifier > const & | getOutputs () const & |
Tape & | getTape () |
Used to get a reference to the restored tape. | |
void | restoreIoBinary () |
Restore the IO for the binary readers. | |
void | restoreIoText () |
Constructor. | |
void | updateUserIO (Identifier const &linearOffset) |
This method is used to remove any offset and to update the largest created index. | |
Reads and restores a binary file for a Jacobian tape.
The reader uses the "filename".dat
file to restore the statements and the "filename"IO.dat
to restore the inputs and outputs of the tape.
The format of the read "filename".dat
file is as follows:
See codi::TapeReaderInterface for a general description on how to use tape readers.
T_Type | The CoDiPack type of the tape that is to be restored. |
|
inlinevirtual |
This method uses the the fileName to reproduce a valid tape.
Reimplemented from codi::TapeReaderInterface< T_Type >.