38#include "commonReaderWriterBase.hpp"
55 template<
typename T_Type>
60 using Tape =
typename Type::Tape;
62 using Real =
typename Type::Real;
66 MathRepWriter(std::string
const& name, std::vector<Identifier>
const& in, std::vector<Identifier>
const& out)
67 :
Base(false, name, in, out) {};
78 Identifier const*
const rhsIdentifiers,
size_t const& curPassiveValuePos,
79 Real const*
const passiveValues,
size_t& curConstantPos,
Real const*
const constantValues,
81 CODI_UNUSED(primalValue, curPassiveValuePos, passiveValues, curConstantPos, constantValues, stmtEvalHandle);
#define CODI_Unlikely
Declare unlikely evaluation of an execution path.
Definition config.h:399
#define CODI_Likely
Declare likely evaluation of an execution path.
Definition config.h:397
#define CODI_DD(Type, Default)
Abbreviation for CODI_DECLARE_DEFAULT.
Definition macros.hpp:94
uint8_t ArgumentSize
Type for the number of arguments in statements.
Definition config.h:117
size_t constexpr StatementInputTag
Tag for statements that are inputs. Used in linear index management context.
Definition config.h:123
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
This base class is used to modify the math representation of a statement.
Definition commonReaderWriterBase.hpp:231
FILE * fileHandleGraph
The handle for the writer.
Definition commonReaderWriterBase.hpp:241
std::string modifyMathRep(std::string const &mathRep, Identifier const &lhsIdentifier, Identifier const *const rhsIdentifiers, size_t const &nActiveValues)
Replaces all general identifiers in the math representation with the input, output or temporary annot...
Definition commonReaderWriterBase.hpp:344
Generates a file with the math representation for each of the statements.
Definition mathRepWriter.hpp:56
typename Type::Real Real
See TapeWriterInterface.
Definition mathRepWriter.hpp:62
MathRepWriter(std::string const &name, std::vector< Identifier > const &in, std::vector< Identifier > const &out)
Constructor.
Definition mathRepWriter.hpp:66
T_Type Type
See TapeWriterInterface.
Definition mathRepWriter.hpp:57
typename Type::Tape Tape
See TapeWriterInterface.
Definition mathRepWriter.hpp:60
typename Tape::EvalHandle EvalHandle
See TapeWriterInterface.
Definition mathRepWriter.hpp:63
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 mathRepWriter.hpp:76
typename Type::Identifier Identifier
See TapeWriterInterface.
Definition mathRepWriter.hpp:61
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 mathRepresentation
Definition tapeReaderWriterInterface.hpp:73