TMB Documentation
v1.9.11
|
Operator auto-completion. More...
#include <global.hpp>
Public Member Functions | |
OperatorPure * | copy () |
Return a copy of this OperatorPure. | |
void | deallocate () |
Deallocate this OperatorPure. | |
void | decrement (IndexPair &ptr) |
Decrement input/output pointers to prepare for the previous OperatorPure in the stack. | |
void | dependencies (Args<> &args, Dependencies &dep) |
Get the indices of variables required by this operator. More... | |
void | dependencies_updating (Args<> &args, Dependencies &dep) |
Get the indices of variables updated by this operator. More... | |
void | forward (ForwardArgs< Scalar > &args) |
Update output values of this OperatorPure. | |
void | forward (ForwardArgs< Replay > &args) |
Replay operation sequence. More... | |
void | forward (ForwardArgs< bool > &args) |
Mark forward dependencies. More... | |
void | forward (ForwardArgs< Writer > &args) |
Source code writer. More... | |
void | forward_incr (ForwardArgs< Scalar > &args) |
Fast equivalent of combined forward() and increment() | |
void | forward_incr (ForwardArgs< Replay > &args) |
Replay operation sequence. More... | |
void | forward_incr (ForwardArgs< bool > &args) |
Fast equivalent of combined forward() and increment() More... | |
void | forward_incr (ForwardArgs< Writer > &args) |
Source code writer. More... | |
void | forward_incr_mark_dense (ForwardArgs< bool > &args) |
Conditionally mark all outputs. | |
void * | identifier () |
Operator identifier. More... | |
void * | incomplete () |
Get pointer to operator before it was completed. More... | |
void | increment (IndexPair &ptr) |
Increment input/output pointers to prepare for the next OperatorPure in the stack. | |
op_info | info () |
Get operator info. | |
Index | input_size () |
Number of inputs to this OperatorPure. | |
const char * | op_name () |
Name of this OperatorPure. | |
std::vector< ad_plain > | operator() (const std::vector< ad_plain > &x) |
Move a stack allocated instance to the heap and let the operation_stack manage the memory. More... | |
void * | operator_data () |
Optional operator_data. | |
OperatorPure * | other_fuse (OperatorPure *other) |
Lookup table for operator fusion. Merge this OperatorPure with another operator. If no match return NULL. | |
Index | output_size () |
Number of outputs from this OperatorPure. | |
void | print (print_config cfg) |
Optional print method. | |
void | reverse (ReverseArgs< Scalar > &args) |
Update input derivs of this OperatorPure. | |
void | reverse (ReverseArgs< Replay > &args) |
Replay operation sequence. More... | |
void | reverse (ReverseArgs< bool > &args) |
Mark reverse dependencies. More... | |
void | reverse (ReverseArgs< Writer > &args) |
Source code writer. More... | |
void | reverse_decr (ReverseArgs< Scalar > &args) |
Fast equivalent of combined decrement() and reverse() | |
void | reverse_decr (ReverseArgs< Replay > &args) |
Replay operation sequence. More... | |
void | reverse_decr (ReverseArgs< bool > &args) |
Fast equivalent of combined decrement() and reverse() More... | |
void | reverse_decr (ReverseArgs< Writer > &args) |
Source code writer. More... | |
OperatorPure * | self_fuse () |
Lookup table for operator fusion. Merge this OperatorPure with an identical copy. If no match return NULL. | |
Operator auto-completion.
Generate the mandatory members required by OperatorPure
based on a given Operator
.
Definition at line 2129 of file global.hpp.
|
inlinevirtual |
Get the indices of variables required by this operator.
Result of this operation (the indices) are appended to the dep
argument. Its main purpose is to build the computational graph. Under normal circumstances the information can be autogenerated from the operator inputs. However there is a subtle exception: Operators are allowed to take reference inputs. For instance a matrix multiply only requires addresses of the first element of the two input matrices. Such cases must have special code to provide all input addresses.
reverse(ReverseArgs<Replay>& args)
. Implements TMBad::global::OperatorPure.
Definition at line 2209 of file global.hpp.
|
inlinevirtual |
Get the indices of variables updated by this operator.
Used only when Operator::updating
flag is set.
Implements TMBad::global::OperatorPure.
Definition at line 2212 of file global.hpp.
|
inlinevirtual |
Replay operation sequence.
Update output values of this OperatorPure.
Implements TMBad::global::OperatorPure.
Definition at line 2138 of file global.hpp.
|
inlinevirtual |
Mark forward dependencies.
Calculate \(y=Jx\) where \(J\) denotes the Jacobian sparsity pattern of the operator. Operators are by default assumed to be dense.
Implements TMBad::global::OperatorPure.
Definition at line 2154 of file global.hpp.
|
inlinevirtual |
Source code writer.
Update output values of this OperatorPure.
Implements TMBad::global::OperatorPure.
Definition at line 2163 of file global.hpp.
|
inlinevirtual |
Replay operation sequence.
Fast equivalent of combined forward()
and increment()
Implements TMBad::global::OperatorPure.
Definition at line 2145 of file global.hpp.
|
inlinevirtual |
Fast equivalent of combined forward()
and increment()
Implements TMBad::global::OperatorPure.
Definition at line 2156 of file global.hpp.
|
inlinevirtual |
Source code writer.
Fast equivalent of combined forward()
and increment()
Implements TMBad::global::OperatorPure.
Definition at line 2165 of file global.hpp.
|
inlinevirtual |
Operator identifier.
If two operators have equal identifier it can be assumed that they represent equal mappings, i.e. same input implies same output.
Implements TMBad::global::OperatorPure.
Definition at line 2263 of file global.hpp.
|
inlinevirtual |
Get pointer to operator before it was completed.
Implements TMBad::global::OperatorPure.
Definition at line 2271 of file global.hpp.
|
inline |
Move a stack allocated instance to the heap and let the operation_stack
manage the memory.
This is only useful for dynamic operators and therfore disallowed for static operators.
Definition at line 2171 of file global.hpp.
|
inlinevirtual |
Replay operation sequence.
Update input derivs of this OperatorPure.
Implements TMBad::global::OperatorPure.
Definition at line 2144 of file global.hpp.
|
inlinevirtual |
Mark reverse dependencies.
Calculate \(x=J^Ty\) where \(J\) denotes the Jacobian sparsity pattern of the operator. Operators are by default assumed to be dense.
Implements TMBad::global::OperatorPure.
Definition at line 2155 of file global.hpp.
|
inlinevirtual |
Source code writer.
Update input derivs of this OperatorPure.
Implements TMBad::global::OperatorPure.
Definition at line 2164 of file global.hpp.
|
inlinevirtual |
Replay operation sequence.
Fast equivalent of combined decrement()
and reverse()
Implements TMBad::global::OperatorPure.
Definition at line 2152 of file global.hpp.
|
inlinevirtual |
Fast equivalent of combined decrement()
and reverse()
Implements TMBad::global::OperatorPure.
Definition at line 2157 of file global.hpp.
|
inlinevirtual |
Source code writer.
Fast equivalent of combined decrement()
and reverse()
Implements TMBad::global::OperatorPure.
Definition at line 2166 of file global.hpp.