TMB Documentation
v1.9.11
|
Copy value and set derivative to zero. More...
#include <global.hpp>
Public Member Functions | |
void | dependencies (Args<> &args, Dependencies &dep) const |
Derivatives in the sparse case are untracked, i.e. zero. More... | |
template<class Type > | |
Type | eval (Type x0) |
Evaluation is as the CopyOp except in replay mode. | |
template<class Type > | |
void | reverse (ReverseArgs< Type > &args) |
Derivatives in the dense case are zero. | |
Public Member Functions inherited from TMBad::global::Operator< 1 > | |
void | dependencies_updating (Args<> &args, Dependencies &dep) const |
Default implementation of OperatorPure::dependencies_updating() | |
void * | operator_data () |
Return operator specific dynamic information (optional) | |
OperatorPure * | other_fuse (OperatorPure *self, OperatorPure *other) |
How to fuse this operator (self) with another (other) | |
void | print (print_config cfg) |
Print this operator (optional) | |
Additional Inherited Members | |
Static Public Attributes inherited from TMBad::global::Operator< 1 > | |
static const bool | add_forward_replay_copy |
Should this operator replay it self by invoking the copy CTOR ? | |
static const bool | add_static_identifier |
Should this operator have a static identifier ? | |
static const bool | allow_remap |
Is it safe to remap the inputs of this operator? More... | |
static const int | dependent_variable |
Is output of this operator a dependent variable ? | |
static const bool | dynamic |
Does this operator require dynamic allocation ? | |
static const bool | elimination_protected |
Protect this operator from elimination by the tape optimizer ? | |
static const bool | have_dependencies |
Have dependencies member been defined ? | |
static const bool | have_eval |
Does this class have an eval member from which to define forward ? | |
static const bool | have_forward_incr_reverse_decr |
Have forward_incr and reverse_incr members been defined ? | |
static const bool | have_forward_mark_reverse_mark |
Have forward_mark and reverse_mark members been defined ? | |
static const bool | have_forward_reverse |
Have forward and reverse members been defined ? | |
static const bool | have_increment_decrement |
Have increment and decrement members been defined ? | |
static const bool | have_input_size_output_size |
Have input_size and output_size members been defined ? | |
static const bool | implicit_dependencies |
Does this operator have implicit dependencies? More... | |
static const int | independent_variable |
Is output of this operator an independent variable ? | |
static const bool | is_constant |
Is this a constant operator ? | |
static const bool | is_linear |
Is this a linear operator ? | |
static const int | max_fuse_depth |
How many times can this operator be doubled ? | |
static const int | ninput |
Number of operator inputs. | |
static const int | noutput |
Number of operator outputs. | |
static const bool | smart_pointer |
Is this operator a 'smart pointer' (with reference counting) ? | |
static const bool | updating |
This operator may update existing variables ? More... | |
Copy value and set derivative to zero.
The purpose of this operator is to allow using temporaries without tracking their derivatives. The ValOp has the following properties:
CopyOp
. Definition at line 2625 of file global.hpp.
void TMBad::global::ad_plain::ValOp::dependencies | ( | Args<> & | args, |
Dependencies & | dep | ||
) | const |
Derivatives in the sparse case are untracked, i.e. zero.
ValOp
are not marked for removal by the tape optimizer despite the empty dependencies
(because the tape optimizer uses the boolean pattern which has the default mark_dense
implementation).