42#include "../expressions/lhsExpressionInterface.hpp"
43#include "../expressions/logic/compileTimeTraversalLogic.hpp"
44#include "../expressions/logic/helpers/forEachLeafLogic.hpp"
45#include "../expressions/logic/helpers/jacobianComputationLogic.hpp"
46#include "../expressions/logic/traversalLogic.hpp"
47#include "../expressions/referenceActiveType.hpp"
49#include "../misc/mathUtility.hpp"
50#include "../misc/memberStore.hpp"
51#include "../traits/computationTraits.hpp"
52#include "../traits/expressionTraits.hpp"
53#include "commonTapeImplementation.hpp"
54#include "data/chunk.hpp"
55#include "data/chunkedData.hpp"
56#include "indices/indexManagerInterface.hpp"
57#include "misc/adjointVectorAccess.hpp"
58#include "misc/duplicateJacobianRemover.hpp"
59#include "misc/localAdjoints.hpp"
73 template<
typename T_Real,
typename T_Gradient,
typename T_IndexManager,
template<
typename,
typename>
class T_Data,
74 template<
typename,
typename,
typename>
class T_Adjoints = LocalAdjoints>
81 template<
typename Chunk,
typename Nested>
88 template<
typename Impl>
94 IndexManager::NeedsStaticStorage;
98 using StatementChunk =
typename std::conditional<IsLinearIndexHandler, Chunk1<Config::ArgumentSize>,
124 template<
typename T_TapeTypes,
typename T_Impl>
136 using Real =
typename TapeTypes::Real;
151 template<
typename Adjo
int>
159 TapeTypes::IsLinearIndexHandler;
164#if CODI_RemoveDuplicateJacobianArguments
178 return static_cast<Impl const&
>(*this);
182 return static_cast<Impl&
>(*this);
192 template<
typename... Args>
196 template<
typename... Args>
214 jacobianData(std::max(Config::ChunkSize, Config::MaxArgumentSize)),
239 checkAdjointSize(identifier);
265 template<
typename Real>
269 identifier = IndexManager::InactiveIndex;
273 template<
typename Real>
288 template<
typename Node,
typename Jacobian,
typename DataVector>
302 template<
typename Type,
typename Jacobian,
typename DataVector>
311 node.jacobian += jacobian;
321 template<
typename Type,
typename DataVector>
337 template<
typename Rhs>
342#if CODI_RemoveDuplicateJacobianArguments
343 auto& insertVector = jacobianSorter;
348 pushJacobianLogic.
eval(rhs.
cast(),
Real(1.0), insertVector);
349 pushDelayedJacobianLogic.
eval(rhs.
cast(), insertVector);
351#if CODI_RemoveDuplicateJacobianArguments
361 template<
typename Lhs,
typename Rhs>
370 typename JacobianData::InternalPosHandle jacobianStart =
jacobianData.reserveItems(MaxArgs);
374 size_t numberOfArguments =
jacobianData.getPushedDataCount(jacobianStart);
382 jacobianData.getDataPointers(jacobians, rhsIdentifiers);
383 jacobians -= numberOfArguments;
384 rhsIdentifiers -= numberOfArguments;
387 rhs.
cast().getValue(), numberOfArguments,
388 rhsIdentifiers, jacobians);
397 lhs.
cast().value() = rhs.
cast().getValue();
402 template<
typename Lhs,
typename Rhs>
416 lhs.
cast().value() = rhs.
cast().getValue();
421 template<
typename Lhs>
425 lhs.
cast().value() = rhs;
436 template<
typename Lhs>
439 if (TapeTypes::IsLinearIndexHandler) {
449 if (TapeTypes::IsLinearIndexHandler) {
461 template<
typename Lhs>
463 cast().internalRegisterInput(value,
true);
487 if (TapeTypes::IsLinearIndexHandler) {
488 name =
"CoDi Tape Statistics ( JacobianLinearTape )";
490 name =
"CoDi Tape Statistics ( JacobianReuseTape )";
495 double memoryAdjoints =
static_cast<double>(nAdjoints) *
static_cast<double>(
sizeof(
Gradient));
499 values.
addDoubleEntry(
"Memory allocated", memoryAdjoints,
true,
true);
519 template<
typename Adjo
int>
522 Real const*
const rhsJacobians,
524 size_t endJacobianPos = curJacobianPos - numberOfArguments;
527 while (endJacobianPos < curJacobianPos)
CODI_Likely {
529 adjointVector[rhsIdentifiers[curJacobianPos]] += rhsJacobians[curJacobianPos] * lhsAdjoint;
532 curJacobianPos = endJacobianPos;
541 template<
typename Adjo
int>
544 Real const*
const rhsJacobians,
546 size_t endJacobianPos = curJacobianPos + numberOfArguments;
548 while (curJacobianPos < endJacobianPos)
CODI_Likely {
549 lhsAdjoint += rhsJacobians[curJacobianPos] * adjointVector[rhsIdentifiers[curJacobianPos]];
566 template<
typename Adjo
int>
571 cast(), start, end, &adjointWrapper, EventHints::EvaluationKind::Reverse, EventHints::Endpoint::Begin);
577 EventHints::EvaluationKind::Reverse, EventHints::Endpoint::End);
581 template<
typename Adjo
int>
586 cast(), start, end, &adjointWrapper, EventHints::EvaluationKind::Forward, EventHints::Endpoint::Begin);
592 EventHints::EvaluationKind::Forward, EventHints::Endpoint::End);
660 CODI_EXCEPTION(
"Tried to set a get only parameter.");
677 template<
typename Adjo
int>
693 template<
typename Lhs>
695 cast().internalRegisterInput(value,
false);
717 cast().evaluateForward(start, end,
adjoints.data());
733 cast().incrementManualPushCounter();
742 jacobianData.getDataPointers(jacobians, rhsIdentifiers);
748 rhsIdentifiers, jacobians);
765 cast().initializeManualPushData(lhsValue, lhsIndex, size);
816 evaluate(start, end, adjointsManagement);
836 CODI_EXCEPTION(
"Accessing primal evaluation of an Jacobian tape.");
843 CODI_EXCEPTION(
"Accessing primal vector of an Jacobian tape.");
853 CODI_EXCEPTION(
"Accessing primal vector of an Jacobian tape.");
862 CODI_INLINE void checkAdjointSize(Identifier
const& identifier) {
863 if (identifier >= (Identifier)
adjoints.size()) {
864 internalResizeAdjointsVector();
#define CODI_Unlikely
Declare unlikely evaluation of an execution path.
Definition config.h:399
#define CODI_NO_INLINE
See codi::Config::AvoidedInlines.
Definition config.h:417
#define CODI_INLINE
See codi::Config::ForcedInlines.
Definition config.h:457
#define CODI_Likely
Declare likely evaluation of an execution path.
Definition config.h:397
#define CODI_RemoveDuplicateJacobianArguments
See codi::Config::RemoveDuplicateJacobianArguments.
Definition config.h:229
#define codiAssert(x)
See codi::Config::EnableAssert.
Definition config.h:432
#define CODI_DD(Type, Default)
Abbreviation for CODI_DECLARE_DEFAULT.
Definition macros.hpp:94
#define CODI_ENABLE_CHECK(option, condition)
Definition macros.hpp:53
#define CODI_WRAP_FUNCTION_TEMPLATE(NAME, FUNC)
Wrap a function in a function object. Used for performance optimizations.
Definition macros.hpp:167
#define CODI_T(...)
Abbreviation for CODI_TEMPLATE.
Definition macros.hpp:111
uint16_t LowLevelFunctionToken
Token type for low level functions in the tapes.
Definition config.h:108
const bool CheckEmptyStatements
Tapes push statements only if at least one Jacobian was pushed.
Definition config.h:154
size_t constexpr ChunkSize
Default size of chunks (ChunkBase) used in ChunkedData in reverse tape implementations.
Definition config.h:94
bool constexpr CheckZeroIndex
Ignore active types that are not dependent on any input value in Jacobian tapes.
Definition config.h:178
bool constexpr IgnoreInvalidJacobians
Ignore invalid Jacobians like NaN or Inf.
Definition config.h:240
bool constexpr CheckTapeActivity
Makes it possible to ignore certain code parts. If turned of everything will be recorded.
Definition config.h:170
size_t constexpr StatementLowLevelFunctionTag
Statement tag for low level functions.
Definition config.h:126
bool constexpr CheckJacobianIsZero
Ignore Jacobians that are zero in Jacobian based tapes.
Definition config.h:162
size_t constexpr MaxArgumentSize
Maximum number of arguments in a statement.
Definition config.h:120
bool constexpr StatementEvents
Enable statement events. Disabled by default.
Definition config.h:319
bool constexpr CopyOptimization
Do not store copy statements like a = b; if the identity handler allows it.
Definition config.h:186
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
bool constexpr SkipZeroAdjointEvaluation
Do not perform a reverse evaluation of a statement if the seeding adjoint is zero.
Definition config.h:256
bool isTotalFinite(Type const &v)
Function for checking if all values of the type are finite.
Definition realTraits.hpp:133
typename TraitsImplementation< Type >::PassiveReal PassiveReal
The original computation type, that was used in the application.
Definition realTraits.hpp:117
bool isTotalZero(Type const &v)
Function for checking if the value of the type is completely zero.
Definition realTraits.hpp:139
CoDiPack - Code Differentiation Package.
Definition codi.hpp:90
void CODI_UNUSED(Args const &...)
Disable unused warnings for an arbitrary number of arguments.
Definition macros.hpp:46
IntegralType getNextMultiple(IntegralType const &targetSize, IntegralType const &chunkSize)
Helper function for overallocation in multiples of a given chunk size.
Definition mathUtility.hpp:49
TapeParameters
Configuration options for a tape.
Definition tapeParameters.hpp:52
@ LargestIdentifier
[A: R] Largest identifier distributed by the index manger.
@ JacobianSize
[A: RW] Allocated number of entries in the argument Jacobian vector in Jacobian tapes.
@ StatementSize
[A: RW] Allocated number of entries in the statement vector in all tapes.
AdjointsManagement
Policies for management of the tape's interal adjoints.
Definition tapeParameters.hpp:98
@ Automatic
Manage internal adjoints automatically, including locking, bounds checking, and resizing.
Implementation of VectorAccessInterface for adjoint vectors.
Definition adjointVectorAccess.hpp:59
Definition byteDataView.hpp:51
Data is stored chunk-wise in this DataInterface implementation. If a chunk runs out of space,...
Definition chunkedData.hpp:64
Implementation of all common tape functionality.
Definition commonTapeImplementation.hpp:130
Real manualPushLhsValue
For storeManual, remember the value assigned to the lhs.
Definition commonTapeImplementation.hpp:157
void setParameter(TapeParameters parameter, size_t value)
See Parameters functions.
Definition commonTapeImplementation.hpp:458
void evaluateForward(AdjointsManagement adjointsManagement=AdjointsManagement::Automatic)
Perform a forward evaluation of a part of the tape. It has to hold start <= end.
Definition commonTapeImplementation.hpp:591
size_t manualPushCounter
Count the pushes after storeManual, to identify the last push.
Definition commonTapeImplementation.hpp:160
Identifier manualPushLhsIdentifier
For storeManual, remember the identifier assigned to the lhs.
Definition commonTapeImplementation.hpp:158
bool isActive() const
Check if the tape is recording.
Definition commonTapeImplementation.hpp:319
size_t manualPushGoal
Store the number of expected pushes after a storeManual call.
Definition commonTapeImplementation.hpp:159
void init(typename ImplTapeTypes::NestedData *nested)
Initialize the base class.
Definition commonTapeImplementation.hpp:715
std::set< TapeParameters > options
All options.
Definition commonTapeImplementation.hpp:152
void evaluate(AdjointsManagement adjointsManagement=AdjointsManagement::Automatic)
Perform a full reverse evaluation of the tape.
Definition commonTapeImplementation.hpp:292
void swap(Impl &other)
Swap all data with an other tape.
Definition commonTapeImplementation.hpp:367
typename CommonTapeTypes< ImplTapeTypes >::Position Position
See TapeTypesInterface.
Definition commonTapeImplementation.hpp:144
LowLevelFunctionByteData llfByteData
Byte data for low level functions.
Definition commonTapeImplementation.hpp:155
size_t getParameter(TapeParameters parameter) const
See Parameters functions.
Definition commonTapeImplementation.hpp:430
void evaluatePrimal()
Perform a full (forward) reevaluation of the primals in the tape.
Definition commonTapeImplementation.hpp:690
void internalStoreLowLevelFunction(Config::LowLevelFunctionToken token, size_t size, ByteDataView &dataView)
Called by the implementing tapes to store a low level function. The size is reserved and allocated....
Definition commonTapeImplementation.hpp:493
Data stream interface for tape data. Encapsulates data that is written e.g. for each statement or arg...
Definition dataInterface.hpp:149
Combines entries of Jacobians with the same identifier.
Definition duplicateJacobianRemover.hpp:58
void storeData(Vec &vec)
Definition duplicateJacobianRemover.hpp:98
static void notifyStatementStoreOnTapeListeners(Tape &tape, Identifier const &lhsIdentifier, Real const &newValue, size_t numActiveVariables, Identifier const *rhsIdentifiers, Real const *jacobians)
Invoke callbacks for StatementStoreOnTape events.
Definition eventSystem.hpp:676
static void notifyTapeEvaluateListeners(Tape &tape, Position const &start, Position const &end, VectorAccess *adjoint, EventHints::EvaluationKind evalKind, EventHints::Endpoint endpoint)
Invoke callbacks for TapeEvaluate events.
Definition eventSystem.hpp:486
static void notifyTapeRegisterInputListeners(Tape &tape, Real &value, Identifier &identifier)
Invoke callbacks for TapeRegisterInput events.
Definition eventSystem.hpp:424
Base class for all CoDiPack expressions.
Definition expressionInterface.hpp:59
Impl const & cast() const
Cast to the implementation.
Definition expressionInterface.hpp:75
Counts the number of nodes that inherit from LhsExpressionInterface in the expression.
Definition expressionTraits.hpp:184
Implement logic for leaf nodes only.
Definition forEachLeafLogic.hpp:60
Indices enable the mapping of primal values to their adjoint counterparts.
Definition indexManagerInterface.hpp:78
Abstracts the internal set of adjoint variables provided as part of the tape.
Definition internalAdjointsInterface.hpp:80
Pushes all delayed Jacobians.
Definition jacobianBaseTape.hpp:317
void handleActive(ReferenceActiveType< Type > const &node, DataVector &dataVector)
Specialization for ReferenceActiveType nodes. Pushes the delayed Jacobian.
Definition jacobianBaseTape.hpp:322
Pushes Jacobians and indices to the tape.
Definition jacobianBaseTape.hpp:285
void handleJacobianOnActive(Node const &node, Jacobian jacobianExpr, DataVector &dataVector)
General implementation. Checks for invalid and passive values/Jacobians.
Definition jacobianBaseTape.hpp:289
void handleJacobianOnActive(ReferenceActiveType< Type > const &node, Jacobian jacobianExpr, DataVector &dataVector)
Specialization for ReferenceActiveType nodes. Delays Jacobian push.
Definition jacobianBaseTape.hpp:303
Wrapper helper for improved compiler optimizations.
Definition jacobianBaseTape.hpp:556
Wrapper helper for improved compiler optimizations.
Definition jacobianBaseTape.hpp:538
Base class for all standard Jacobian tape implementations.
Definition jacobianBaseTape.hpp:125
void evaluateKeepState(Position const &start, Position const &end, AdjointsManagement adjointsManagement=AdjointsManagement::Automatic)
Perform a tape evaluation but restore the state afterwards such that it is the same as when the evalu...
Definition jacobianBaseTape.hpp:814
void pushJacobians(ExpressionInterface< Real, Rhs > const &rhs)
Push Jacobians and delayed Jacobians to the tape.
Definition jacobianBaseTape.hpp:338
JacobianData jacobianData
Data stream for argument specific data.
Definition jacobianBaseTape.hpp:171
typename Base::Position Position
See TapeTypesInterface.
Definition jacobianBaseTape.hpp:149
VectorAccess< Gradient > * createVectorAccess()
See Adjoint vector access.
Definition jacobianBaseTape.hpp:672
size_t getParameter(TapeParameters parameter) const
See Parameters functions.
Definition jacobianBaseTape.hpp:631
typename TapeTypes::Gradient Gradient
See TapeTypesInterface.
Definition jacobianBaseTape.hpp:137
typename TapeTypes::JacobianData JacobianData
See JacobianTapeTypes.
Definition jacobianBaseTape.hpp:142
static void internalEvaluateReverse_EvalStatements(Args &&... args)
Perform a reverse evaluation of the tape. Arguments are from the recursive eval methods of the DataIn...
void resizeAdjointVector()
Explicitly trigger resizing of the adjoint vector. See Adjoint vector management.
Definition jacobianBaseTape.hpp:616
Gradient const & gradient(Identifier const &identifier, AdjointsManagement adjointsManagement=AdjointsManagement::Automatic) const
Constant reference access to gradient.
Definition jacobianBaseTape.hpp:248
StatementData statementData
Data stream for statement specific data.
Definition jacobianBaseTape.hpp:170
void store(LhsExpressionInterface< Real, Gradient, Impl, Lhs > &lhs, LhsExpressionInterface< Real, Gradient, Impl, Rhs > const &rhs)
Has to be called by an AD variable every time it is assigned.
Definition jacobianBaseTape.hpp:403
Adjoints adjoints
Evaluation vector for AD.
Definition jacobianBaseTape.hpp:173
void beginUseAdjointVector()
Declare that the adjoint vector is being used. See Adjoint vector management.
Definition jacobianBaseTape.hpp:621
void pushStmtData(Identifier const &index, Config::ArgumentSize const &numberOfArguments)
Add statement specific data to the data streams.
TapeValues internalGetTapeValues() const
Adds data from all streams, the size of the adjoint vector and index manager data.
Definition jacobianBaseTape.hpp:485
void evaluate(Position const &start, Position const &end, Adjoint *data)
Perform a reverse evaluation for a part of the tape. It hast to hold start >= end.
Definition jacobianBaseTape.hpp:567
typename TapeTypes::IndexManager IndexManager
See JacobianTapeTypes.
Definition jacobianBaseTape.hpp:138
friend Base
Allow the base class to call protected and private methods.
Definition jacobianBaseTape.hpp:134
void clearAdjoints(AdjointsManagement adjointsManagement=AdjointsManagement::Automatic)
Clear all adjoint values, that is, set them to zero.
Definition jacobianBaseTape.hpp:468
static void incrementAdjoints(Adjoint *adjointVector, Adjoint const &lhsAdjoint, Config::ArgumentSize const &numberOfArguments, size_t &curJacobianPos, Real const *const rhsJacobians, Identifier const *const rhsIdentifiers)
Performs the AD reverse equation for a statement.
Definition jacobianBaseTape.hpp:520
typename TapeTypes::template Adjoints< Impl > Adjoints
See JacobianTapeTypes.
Definition jacobianBaseTape.hpp:144
void pushLowLevelFunction(Config::LowLevelFunctionToken token, size_t size, ByteDataView &data)
Push a low level function to the tape.
Definition jacobianBaseTape.hpp:774
static void incrementTangents(Adjoint const *const adjointVector, Adjoint &lhsAdjoint, Config::ArgumentSize const &numberOfArguments, size_t &curJacobianPos, Real const *const rhsJacobians, Identifier const *const rhsIdentifiers)
Performs the AD forward equation for a statement.
Definition jacobianBaseTape.hpp:542
void endUseAdjointVector()
Declare that the adjoint vector is no longer used. See Adjoint vector management.
Definition jacobianBaseTape.hpp:626
static void internalEvaluateForward_EvalStatements(Args &&... args)
Perform a forward evaluation of the tape. Arguments are from the recursive eval methods of the DataIn...
void evaluateForward(Position const &start, Position const &end, Adjoint *data)
Perform a reverse evaluation for a part of the tape. It hast to hold start >= end.
Definition jacobianBaseTape.hpp:582
void deleteAdjointVector()
Delete the adjoint vector. See Adjoint vector management.
Definition jacobianBaseTape.hpp:611
void swap(Impl &other)
Swap all data with an other tape.
Definition jacobianBaseTape.hpp:601
void evaluateForward(Position const &start, Position const &end, AdjointsManagement adjointsManagement=AdjointsManagement::Automatic)
Perform a forward evaluation of a part of the tape. It has to hold start <= end.
Definition jacobianBaseTape.hpp:708
typename TapeTypes::Real Real
See TapeTypesInterface.
Definition jacobianBaseTape.hpp:136
typename TapeTypes::StatementData StatementData
See JacobianTapeTypes.
Definition jacobianBaseTape.hpp:141
T_Impl Impl
See JacobianBaseTape.
Definition jacobianBaseTape.hpp:131
Real & primal(Identifier const &identifier)
Not implemented, raises an exception.
Definition jacobianBaseTape.hpp:840
JacobianBaseTape()
Constructor.
Definition jacobianBaseTape.hpp:207
void store(LhsExpressionInterface< Real, Gradient, Impl, Lhs > &lhs, Real const &rhs)
Has to be called by an AD variable every time it is assigned.
Definition jacobianBaseTape.hpp:422
void store(LhsExpressionInterface< Real, Gradient, Impl, Lhs > &lhs, ExpressionInterface< Real, Rhs > const &rhs)
Has to be called by an AD variable every time it is assigned.
Definition jacobianBaseTape.hpp:362
void setParameter(TapeParameters parameter, size_t value)
See Parameters functions.
Definition jacobianBaseTape.hpp:651
VectorAccess< Adjoint > * createVectorAccessCustomAdjoints(Adjoint *data)
See Adjoint vector access.
Definition jacobianBaseTape.hpp:678
typename JacobianData::Position NestedPosition
See JacobianTapeTypes.
Definition jacobianBaseTape.hpp:148
static bool constexpr HasPrimalValues
See PrimalEvaluationTapeInterface.
Definition jacobianBaseTape.hpp:156
static bool constexpr RequiresPrimalRestore
See PrimalEvaluationTapeInterface.
Definition jacobianBaseTape.hpp:160
void evaluateForwardKeepState(Position const &start, Position const &end, AdjointsManagement adjointsManagement=AdjointsManagement::Automatic)
Perform a tape evaluation but restore the state afterwards such that it is the same as when the evalu...
Definition jacobianBaseTape.hpp:820
void registerInput(LhsExpressionInterface< Real, Gradient, Impl, Lhs > &value)
Definition jacobianBaseTape.hpp:462
static bool constexpr AllowJacobianOptimization
See InternalStatementRecordingTapeInterface.
Definition jacobianBaseTape.hpp:155
void storeManual(Real const &lhsValue, Identifier &lhsIndex, Config::ArgumentSize const &size)
Definition jacobianBaseTape.hpp:754
void evaluate(Position const &start, Position const &end, AdjointsManagement adjointsManagement=AdjointsManagement::Automatic)
Perform a reverse evaluation for a part of the tape. It hast to hold start >= end.
Definition jacobianBaseTape.hpp:792
void initIdentifier(Real &value, Identifier &identifier)
Definition jacobianBaseTape.hpp:266
void pushJacobianManual(Real const &jacobian, Real const &value, Identifier const &index)
Definition jacobianBaseTape.hpp:730
void evaluatePrimal(Position const &start, Position const &end)
Not implemented, raises an exception.
Definition jacobianBaseTape.hpp:833
static bool constexpr LinearIndexHandling
See IdentifierInformationTapeInterface.
Definition jacobianBaseTape.hpp:158
Real registerExternalFunctionOutput(LhsExpressionInterface< Real, Gradient, Impl, Lhs > &value)
Definition jacobianBaseTape.hpp:694
void destroyIdentifier(Real &value, Identifier &identifier)
Has to be called for each identifier, before it is deallocated.
Definition jacobianBaseTape.hpp:274
Gradient & gradient(Identifier const &identifier, AdjointsManagement adjointsManagement=AdjointsManagement::Automatic)
Reference access to gradient.
Definition jacobianBaseTape.hpp:236
RealTraits::PassiveReal< Real > PassiveReal
Basic computation type.
Definition jacobianBaseTape.hpp:146
T_TapeTypes TapeTypes
See JacobianBaseTape.
Definition jacobianBaseTape.hpp:129
MemberStore< IndexManager, Impl, TapeTypes::IsStaticIndexHandler > indexManager
Index manager.
Definition jacobianBaseTape.hpp:169
typename TapeTypes::Identifier Identifier
See TapeTypesInterface.
Definition jacobianBaseTape.hpp:139
void deleteVectorAccess(VectorAccessInterface< Real, Identifier > *access)
See Adjoint vector access.
Definition jacobianBaseTape.hpp:683
Real primal(Identifier const &identifier) const
Not implemented, raises an exception.
Definition jacobianBaseTape.hpp:850
void internalRegisterInput(LhsExpressionInterface< Real, Gradient, Impl, Lhs > &value, bool unusedIndex)
Add a new input to the tape.
Definition jacobianBaseTape.hpp:437
Definition jacobianComputationLogic.hpp:53
void link(Child const &child, Root const &root, Jacobian const &jacobian, Args &&... args)
Definition jacobianComputationLogic.hpp:84
Type definitions for the Jacobian tapes.
Definition jacobianBaseTape.hpp:75
T_Real Real
See JacobianTapeTypes.
Definition jacobianBaseTape.hpp:78
typename std::conditional< IsLinearIndexHandler, Chunk1< Config::ArgumentSize >, Chunk2< Identifier, Config::ArgumentSize > >::type StatementChunk
Definition jacobianBaseTape.hpp:98
Data< JacobianChunk, StatementData > JacobianData
Jacobian data vector.
Definition jacobianBaseTape.hpp:103
Data< StatementChunk, IndexManager > StatementData
Statement data vector.
Definition jacobianBaseTape.hpp:100
T_Data< Chunk, Nested > Data
See JacobianTapeTypes.
Definition jacobianBaseTape.hpp:82
T_Gradient Gradient
See JacobianTapeTypes.
Definition jacobianBaseTape.hpp:79
T_IndexManager IndexManager
See JacobianTapeTypes.
Definition jacobianBaseTape.hpp:80
static bool constexpr IsLinearIndexHandler
True if the index manager is linear.
Definition jacobianBaseTape.hpp:92
T_Adjoints< Gradient, Identifier, Impl > Adjoints
See JacobianTapeTypes.
Definition jacobianBaseTape.hpp:89
typename IndexManager::Index Identifier
See IndexManagerInterface.
Definition jacobianBaseTape.hpp:85
JacobianData NestedData
See TapeTypesInterface.
Definition jacobianBaseTape.hpp:105
static bool constexpr IsStaticIndexHandler
True if the index manager must be stored statically in the tape.
Definition jacobianBaseTape.hpp:93
Default implementation of the Jacobian interface.
Definition jacobian.hpp:60
Base class for all CoDiPack lvalue expression.
Definition lhsExpressionInterface.hpp:63
Impl & cast()
Cast to the implementation.
Definition lhsExpressionInterface.hpp:99
Defines a member that can either be static or local to the struct.
Definition memberStore.hpp:56
Type & get()
Get a reference to the actual member.
Definition memberStore.hpp:76
Holds a reference to an ActiveType for manual optimization of common arguments.
Definition referenceActiveType.hpp:59
Interface for the definition of tape types.
Definition commonTapeImplementation.hpp:63
Tape information that can be printed in a pretty print format or a table format.
Definition tapeValues.hpp:73
void addDoubleEntry(std::string const &name, double const &value, bool usedMem=false, bool allocatedMem=false)
Add double entry. If it is a memory entry, it should be in bytes.
Definition tapeValues.hpp:126
void addUnsignedLongEntry(std::string const &name, unsigned long const &value)
Add unsigned long entry.
Definition tapeValues.hpp:150
void addSection(std::string const &name)
Add section. All further entries are added under this section.
Definition tapeValues.hpp:145
void eval(NodeInterface< Node > const &node, Args &&... args)
Start the evaluation of the logic on the given expression.
Definition traversalLogic.hpp:70
void node(Node const &node, Args &&... args)
Called for each node in the expression.
Definition traversalLogic.hpp:86
void link(Child const &child, Root const &root, Args &&... args)
Called for all links in the expression.
Definition traversalLogic.hpp:110
Unified access to the adjoint vector and primal vector in a tape evaluation.
Definition vectorAccessInterface.hpp:91