38#include "commonReaderWriterBase.hpp"
47 template<
typename T_Type>
50 using Tape =
typename Type::Tape;
52 using Real =
typename Type::Real;
58 std::vector<Identifier>
const& rhsIdentifiers, std::vector<Real>
const& rhsJacobians,
59 Identifier& lowestIndex,
bool& isFirstIdentifier) {
61 if (isFirstIdentifier && Tape::TapeTypes::IsLinearIndexHandler) {
62 lowestIndex = lhsIdentifier - 1;
63 isFirstIdentifier =
false;
67 Identifier lhsIdentifierWithOffset = lhsIdentifier - lowestIndex;
70 std::vector<Identifier> rhsIdentifierWithOffset;
77 for (
size_t rhsCount = 0; rhsCount < nArgs; rhsCount++) {
78 rhsIdentifierWithOffset.push_back(rhsIdentifiers[rhsCount] - lowestIndex);
82 this->
tape.createStatementManual(0, lhsIdentifierWithOffset, nArgs, rhsJacobians.data(),
83 rhsIdentifierWithOffset.data());
#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
size_t constexpr StatementLowLevelFunctionTag
Statement tag for low level functions.
Definition config.h:126
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
Used to restore the IO from the "filename"IO.dat or "filename"IO.txt files. Also provides the get met...
Definition commonReaderWriterBase.hpp:143
Tape tape
The newly resorted tape.
Definition commonReaderWriterBase.hpp:153
Used to register a statement for a Jacobian tape.
Definition jacobianBaseReaderWriter.hpp:48
typename Type::Identifier Identifier
See TapeReaderInterface.
Definition jacobianBaseReaderWriter.hpp:51
void registerStatement(Identifier const &lhsIdentifier, Config::ArgumentSize const &nArgs, std::vector< Identifier > const &rhsIdentifiers, std::vector< Real > const &rhsJacobians, Identifier &lowestIndex, bool &isFirstIdentifier)
Constructor.
Definition jacobianBaseReaderWriter.hpp:57
typename Type::Real Real
See TapeReaderInterface.
Definition jacobianBaseReaderWriter.hpp:52
T_Type Type
See TapeReaderInterface.
Definition jacobianBaseReaderWriter.hpp:49
typename Type::Tape Tape
See TapeReaderInterface.
Definition jacobianBaseReaderWriter.hpp:50