38#include "../../expressions/lhsExpressionInterface.hpp"
39#include "../../traits/tapeTraits.hpp"
40#include "../data/position.hpp"
127 template<
typename T_Type>
130 using Tape =
typename Type::Tape;
133 using Real =
typename Type::Real;
150 Real const*
const rhsJacobians,
Identifier const*
const rhsIdentifiers,
152 CODI_UNUSED(curLhsIdentifier, curJacobianPos, rhsJacobians, rhsIdentifiers, nJacobians);
161 Identifier const*
const rhsIdentifiers,
size_t const& curPassiveValuePos,
162 Real const*
const passiveValues,
size_t& curConstantPos,
164 CODI_UNUSED(info, curLhsIdentifier, primalValue, nPassiveValues, curRhsIdentifiersPos, rhsIdentifiers,
165 passiveValues, curPassiveValuePos, curConstantPos, constantValues, stmtEvalHandle);
172 CODI_UNUSED(curLLFByteDataPos, dataPtr, curLLFInfoDataPos, tokenPtr, dataSizePtr);
249 template<
typename T_Type>
252 using Tape =
typename Type::Tape;
254 using Real =
typename Type::Real;
263 virtual std::vector<Identifier>
const&
getInputs() const& = 0;
#define CODI_DD(Type, Default)
Abbreviation for CODI_DECLARE_DEFAULT.
Definition macros.hpp:94
uint16_t LowLevelFunctionDataSize
Size store type for a low level function.
Definition config.h:98
uint16_t LowLevelFunctionToken
Token type for low level functions in the tapes.
Definition config.h:108
uint8_t ArgumentSize
Type for the number of arguments in statements.
Definition config.h:117
CoDiPack - Code Differentiation Package.
Definition codi.hpp:91
void CODI_UNUSED(Args const &...)
Disable unused warnings for an arbitrary number of arguments.
Definition macros.hpp:46
FileType
Used to select the type of writer that should be generated.
Definition tapeReaderWriterInterface.hpp:47
size_t EvalHandleKey
Key for the evalHandle lookup.
Definition tapeReaderWriterInterface.hpp:44
IdentifierType
Used by the math statements to record the type of each identifier. This information is then used in t...
Definition tapeReaderWriterInterface.hpp:59
The interface is used by all the tape readers. The tape readers are used to restore a tape from eithe...
Definition tapeReaderWriterInterface.hpp:250
virtual std::vector< Identifier > const & getOutputs() const &=0
typename Type::Tape Tape
The tape type that is to be restored.
Definition tapeReaderWriterInterface.hpp:252
virtual ~TapeReaderInterface()
Destructor.
Definition tapeReaderWriterInterface.hpp:256
virtual std::vector< Identifier > const & getInputs() const &=0
Used to get the restored inputs of the tape.
typename Type::Identifier Identifier
Identifier for the internal management, e.g. int.
Definition tapeReaderWriterInterface.hpp:253
typename Type::Real Real
Primal computation type, e.g. double.
Definition tapeReaderWriterInterface.hpp:254
T_Type Type
The evaluation type.
Definition tapeReaderWriterInterface.hpp:251
virtual Tape & getTape()=0
Used to get a reference to the restored tape.
virtual void readFile(std::string const &name)
This method uses the the fileName to reproduce a valid tape.
Definition tapeReaderWriterInterface.hpp:259
The interface used by all the tape writers. The tape writers are used to generate text,...
Definition tapeReaderWriterInterface.hpp:128
typename Tape::EvalHandle EvalHandle
Evaluation handle used for primal value tapes.
Definition tapeReaderWriterInterface.hpp:135
virtual void writeStatement(WriteInfo const &info, Identifier const &curLhsIdentifier, Real const &primalValue, Config::ArgumentSize const &nPassiveValues, size_t const &curRhsIdentifiersPos, Identifier const *const rhsIdentifiers, size_t const &curPassiveValuePos, Real const *const passiveValues, size_t &curConstantPos, Real const *const constantValues, EvalHandle stmtEvalHandle)
Called for each statement. The method writes the current statement to the file. This overload is used...
Definition tapeReaderWriterInterface.hpp:159
T_Type Type
The evaluation type.
Definition tapeReaderWriterInterface.hpp:129
virtual void start(Tape &tape)
Destructor.
Definition tapeReaderWriterInterface.hpp:143
virtual void writeLowLevelFunction(size_t &curLLFByteDataPos, char *dataPtr, size_t &curLLFInfoDataPos, Config::LowLevelFunctionToken *const tokenPtr, Config::LowLevelFunctionDataSize *const dataSizePtr)
Used for statements that contain a low level function.
Definition tapeReaderWriterInterface.hpp:169
typename Type::Identifier Identifier
Identifier for the internal management, e.g. int.
Definition tapeReaderWriterInterface.hpp:132
typename Type::Tape Tape
The tape type that is to be written out.
Definition tapeReaderWriterInterface.hpp:130
typename Type::Real Real
Primal computation type, e.g. double.
Definition tapeReaderWriterInterface.hpp:133
virtual void finish()
After all the statements have been written, the finish method finalizes the writing process.
Definition tapeReaderWriterInterface.hpp:176
virtual void writeStatement(Identifier const &curLhsIdentifier, size_t &curJacobianPos, Real const *const rhsJacobians, Identifier const *const rhsIdentifiers, Config::ArgumentSize const &nJacobians)
Called for each statement. The method writes the current statement to the file. This overload is used...
Definition tapeReaderWriterInterface.hpp:149
This class is used during the writing process of a primal value tape. The WriteInfo is returned by co...
Definition tapeReaderWriterInterface.hpp:69
size_t numberOfActiveArguments
Number of active arguments.
Definition tapeReaderWriterInterface.hpp:70
std::string stmtExpression
Used to generate a .hpp file for reading back a primal value tape.
Definition tapeReaderWriterInterface.hpp:72
std::string mathRepresentation
Definition tapeReaderWriterInterface.hpp:73
size_t numberOfConstantArguments
Number of constant arguments.
Definition tapeReaderWriterInterface.hpp:71