TMB Documentation
v1.9.11
|
The abstract operator for the operation stack global::opstack
More...
#include <global.hpp>
Public Member Functions | |
virtual OperatorPure * | copy ()=0 |
Return a copy of this OperatorPure. | |
virtual void | deallocate ()=0 |
Deallocate this OperatorPure. | |
virtual void | decrement (IndexPair &ptr)=0 |
Decrement input/output pointers to prepare for the previous OperatorPure in the stack. | |
virtual void | dependencies (Args<> &args, Dependencies &dep)=0 |
Get the indices of variables required by this operator. More... | |
virtual void | dependencies_updating (Args<> &args, Dependencies &dep)=0 |
Get the indices of variables updated by this operator. More... | |
virtual void | forward (ForwardArgs< Scalar > &args)=0 |
Update output values of this OperatorPure. | |
virtual void | forward (ForwardArgs< bool > &args)=0 |
Mark forward dependencies. More... | |
virtual void | forward (ForwardArgs< Replay > &args)=0 |
Replay operation sequence. More... | |
virtual void | forward (ForwardArgs< Writer > &args)=0 |
Source code writer. More... | |
virtual void | forward_incr (ForwardArgs< Scalar > &args)=0 |
Fast equivalent of combined forward() and increment() | |
virtual void | forward_incr (ForwardArgs< bool > &args)=0 |
Fast equivalent of combined forward() and increment() More... | |
virtual void | forward_incr (ForwardArgs< Replay > &args)=0 |
Replay operation sequence. More... | |
virtual void | forward_incr (ForwardArgs< Writer > &args)=0 |
Source code writer. More... | |
virtual void | forward_incr_mark_dense (ForwardArgs< bool > &args)=0 |
Conditionally mark all outputs. | |
virtual void * | identifier ()=0 |
Operator identifier. More... | |
virtual void * | incomplete ()=0 |
Get pointer to operator before it was completed. More... | |
virtual void | increment (IndexPair &ptr)=0 |
Increment input/output pointers to prepare for the next OperatorPure in the stack. | |
virtual op_info | info ()=0 |
Get operator info. | |
virtual Index | input_size ()=0 |
Number of inputs to this OperatorPure. | |
virtual const char * | op_name () |
Name of this OperatorPure. | |
virtual void * | operator_data ()=0 |
Optional operator_data. | |
virtual OperatorPure * | other_fuse (OperatorPure *other)=0 |
Lookup table for operator fusion. Merge this OperatorPure with another operator. If no match return NULL. | |
virtual Index | output_size ()=0 |
Number of outputs from this OperatorPure. | |
virtual void | print (print_config cfg)=0 |
Optional print method. | |
virtual void | reverse (ReverseArgs< Scalar > &args)=0 |
Update input derivs of this OperatorPure. | |
virtual void | reverse (ReverseArgs< bool > &args)=0 |
Mark reverse dependencies. More... | |
virtual void | reverse (ReverseArgs< Replay > &args)=0 |
Replay operation sequence. More... | |
virtual void | reverse (ReverseArgs< Writer > &args)=0 |
Source code writer. More... | |
virtual void | reverse_decr (ReverseArgs< Scalar > &args)=0 |
Fast equivalent of combined decrement() and reverse() | |
virtual void | reverse_decr (ReverseArgs< bool > &args)=0 |
Fast equivalent of combined decrement() and reverse() More... | |
virtual void | reverse_decr (ReverseArgs< Replay > &args)=0 |
Replay operation sequence. More... | |
virtual void | reverse_decr (ReverseArgs< Writer > &args)=0 |
Source code writer. More... | |
virtual OperatorPure * | self_fuse ()=0 |
Lookup table for operator fusion. Merge this OperatorPure with an identical copy. If no match return NULL. | |
The abstract operator for the operation stack global::opstack
Complete
class. Definition at line 811 of file global.hpp.
|
pure virtual |
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)
. Implemented in TMBad::global::Complete< OperatorBase >, and TMBad::global::Complete< SpAxOp< T > >.
|
pure virtual |
Get the indices of variables updated by this operator.
Used only when Operator::updating
flag is set.
Implemented in TMBad::global::Complete< OperatorBase >, and TMBad::global::Complete< SpAxOp< T > >.
|
pure virtual |
Mark forward dependencies.
Calculate \(y=Jx\) where \(J\) denotes the Jacobian sparsity pattern of the operator. Operators are by default assumed to be dense.
Implemented in TMBad::global::Complete< OperatorBase >, and TMBad::global::Complete< SpAxOp< T > >.
|
pure virtual |
Replay operation sequence.
Update output values of this OperatorPure.
Implemented in TMBad::global::Complete< OperatorBase >, and TMBad::global::Complete< SpAxOp< T > >.
|
pure virtual |
Source code writer.
Update output values of this OperatorPure.
Implemented in TMBad::global::Complete< OperatorBase >, and TMBad::global::Complete< SpAxOp< T > >.
|
pure virtual |
Fast equivalent of combined forward()
and increment()
Implemented in TMBad::global::Complete< OperatorBase >, and TMBad::global::Complete< SpAxOp< T > >.
|
pure virtual |
Replay operation sequence.
Fast equivalent of combined forward()
and increment()
Implemented in TMBad::global::Complete< OperatorBase >, and TMBad::global::Complete< SpAxOp< T > >.
|
pure virtual |
Source code writer.
Fast equivalent of combined forward()
and increment()
Implemented in TMBad::global::Complete< OperatorBase >, and TMBad::global::Complete< SpAxOp< T > >.
|
pure virtual |
Operator identifier.
If two operators have equal identifier it can be assumed that they represent equal mappings, i.e. same input implies same output.
Implemented in TMBad::global::Complete< OperatorBase >, and TMBad::global::Complete< SpAxOp< T > >.
Referenced by TMBad::remap_identical_sub_expressions().
|
pure virtual |
Get pointer to operator before it was completed.
Implemented in TMBad::global::Complete< OperatorBase >, and TMBad::global::Complete< SpAxOp< T > >.
|
pure virtual |
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.
Implemented in TMBad::global::Complete< OperatorBase >, and TMBad::global::Complete< SpAxOp< T > >.
|
pure virtual |
Replay operation sequence.
Update input derivs of this OperatorPure.
Implemented in TMBad::global::Complete< OperatorBase >, and TMBad::global::Complete< SpAxOp< T > >.
|
pure virtual |
Source code writer.
Update input derivs of this OperatorPure.
Implemented in TMBad::global::Complete< OperatorBase >, and TMBad::global::Complete< SpAxOp< T > >.
|
pure virtual |
Fast equivalent of combined decrement()
and reverse()
Implemented in TMBad::global::Complete< OperatorBase >, and TMBad::global::Complete< SpAxOp< T > >.
|
pure virtual |
Replay operation sequence.
Fast equivalent of combined decrement()
and reverse()
Implemented in TMBad::global::Complete< OperatorBase >, and TMBad::global::Complete< SpAxOp< T > >.
|
pure virtual |
Source code writer.
Fast equivalent of combined decrement()
and reverse()
Implemented in TMBad::global::Complete< OperatorBase >, and TMBad::global::Complete< SpAxOp< T > >.