TMB Documentation  v1.9.11
Public Member Functions | List of all members
TMBad::global::OperatorPure Struct Referenceabstract

The abstract operator for the operation stack global::opstack More...

#include <global.hpp>

Public Member Functions

virtual OperatorPurecopy ()=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 OperatorPureother_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 OperatorPureself_fuse ()=0
 Lookup table for operator fusion. Merge this OperatorPure with an identical copy. If no match return NULL.
 

Detailed Description

The abstract operator for the operation stack global::opstack

Definition at line 811 of file global.hpp.

Member Function Documentation

§ dependencies()

virtual void TMBad::global::OperatorPure::dependencies ( Args<> &  args,
Dependencies &  dep 
)
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.

Note
This information is somewhat overlapping with that of reverse(ReverseArgs<Replay>& args).

Implemented in TMBad::global::Complete< OperatorBase >, and TMBad::global::Complete< SpAxOp< T > >.

§ dependencies_updating()

virtual void TMBad::global::OperatorPure::dependencies_updating ( Args<> &  args,
Dependencies &  dep 
)
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 > >.

§ forward() [1/3]

virtual void TMBad::global::OperatorPure::forward ( ForwardArgs< bool > &  args)
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 > >.

§ forward() [2/3]

virtual void TMBad::global::OperatorPure::forward ( ForwardArgs< Replay > &  args)
pure virtual

Replay operation sequence.

Update output values of this OperatorPure.

Implemented in TMBad::global::Complete< OperatorBase >, and TMBad::global::Complete< SpAxOp< T > >.

§ forward() [3/3]

virtual void TMBad::global::OperatorPure::forward ( ForwardArgs< Writer > &  args)
pure virtual

Source code writer.

Update output values of this OperatorPure.

Implemented in TMBad::global::Complete< OperatorBase >, and TMBad::global::Complete< SpAxOp< T > >.

§ forward_incr() [1/3]

virtual void TMBad::global::OperatorPure::forward_incr ( ForwardArgs< bool > &  args)
pure virtual

§ forward_incr() [2/3]

virtual void TMBad::global::OperatorPure::forward_incr ( ForwardArgs< Replay > &  args)
pure virtual

Replay operation sequence.

Fast equivalent of combined forward() and increment()

Implemented in TMBad::global::Complete< OperatorBase >, and TMBad::global::Complete< SpAxOp< T > >.

§ forward_incr() [3/3]

virtual void TMBad::global::OperatorPure::forward_incr ( ForwardArgs< Writer > &  args)
pure virtual

Source code writer.

Fast equivalent of combined forward() and increment()

Implemented in TMBad::global::Complete< OperatorBase >, and TMBad::global::Complete< SpAxOp< T > >.

§ identifier()

virtual void* TMBad::global::OperatorPure::identifier ( )
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().

§ incomplete()

virtual void* TMBad::global::OperatorPure::incomplete ( )
pure virtual

Get pointer to operator before it was completed.

Warning
Avoid unless strictly necessary

Implemented in TMBad::global::Complete< OperatorBase >, and TMBad::global::Complete< SpAxOp< T > >.

§ reverse() [1/3]

virtual void TMBad::global::OperatorPure::reverse ( ReverseArgs< bool > &  args)
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 > >.

§ reverse() [2/3]

virtual void TMBad::global::OperatorPure::reverse ( ReverseArgs< Replay > &  args)
pure virtual

Replay operation sequence.

Update input derivs of this OperatorPure.

Implemented in TMBad::global::Complete< OperatorBase >, and TMBad::global::Complete< SpAxOp< T > >.

§ reverse() [3/3]

virtual void TMBad::global::OperatorPure::reverse ( ReverseArgs< Writer > &  args)
pure virtual

Source code writer.

Update input derivs of this OperatorPure.

Implemented in TMBad::global::Complete< OperatorBase >, and TMBad::global::Complete< SpAxOp< T > >.

§ reverse_decr() [1/3]

virtual void TMBad::global::OperatorPure::reverse_decr ( ReverseArgs< bool > &  args)
pure virtual

§ reverse_decr() [2/3]

virtual void TMBad::global::OperatorPure::reverse_decr ( ReverseArgs< Replay > &  args)
pure virtual

Replay operation sequence.

Fast equivalent of combined decrement() and reverse()

Implemented in TMBad::global::Complete< OperatorBase >, and TMBad::global::Complete< SpAxOp< T > >.

§ reverse_decr() [3/3]

virtual void TMBad::global::OperatorPure::reverse_decr ( ReverseArgs< Writer > &  args)
pure virtual

Source code writer.

Fast equivalent of combined decrement() and reverse()

Implemented in TMBad::global::Complete< OperatorBase >, and TMBad::global::Complete< SpAxOp< T > >.


The documentation for this struct was generated from the following file:
License: GPL v2