TMB Documentation  v1.9.11
Public Member Functions | Static Public Attributes | List of all members
TMBad::global::Rep< Operator1 > Struct Template Reference

Replicate an operator. More...

#include <global.hpp>

Public Member Functions

OperatorPurecompress ()
 Attempt to apply input compression to this Rep operator. More...
 
- Public Member Functions inherited from TMBad::global::Operator< ninput, noutput >
void dependencies_updating (Args<> &args, Dependencies &dep) const
 Default implementation of OperatorPure::dependencies_updating()
 
void * operator_data ()
 Return operator specific dynamic information (optional)
 
OperatorPureother_fuse (OperatorPure *self, OperatorPure *other)
 How to fuse this operator (self) with another (other)
 
void print (print_config cfg)
 Print this operator (optional)
 

Static Public Attributes

static const int dependent_variable = Operator1::dependent_variable
 Is output of this operator a dependent variable ? More...
 
static const bool have_forward_incr_reverse_decr = true
 Have forward_incr and reverse_incr members been defined ? More...
 
static const bool have_forward_reverse = false
 Have forward and reverse members been defined ? More...
 
static const bool have_input_size_output_size = true
 Have input_size and output_size members been defined ? More...
 
static const int independent_variable = Operator1::independent_variable
 Is output of this operator an independent variable ? More...
 
static const bool is_linear = Operator1::is_linear
 Is this a linear operator ? More...
 
- Static Public Attributes inherited from TMBad::global::DynamicOperator<-1, -1 >
static const bool dynamic
 
static const int max_fuse_depth
 
- Static Public Attributes inherited from TMBad::global::Operator< ninput, noutput >
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...
 

Detailed Description

template<class Operator1>
struct TMBad::global::Rep< Operator1 >

Replicate an operator.

If an operator occurs many times in a row the information can be compressed. Knowing the operator type and the number of occurences is sufficient.

Note
When replacing a batch of binary operators by Rep the memory reduction is assymptotically 1/3 (ratio will in general depend on the configuration typedefs).

Definition at line 1882 of file global.hpp.

Member Function Documentation

§ compress()

template<class Operator1 >
OperatorPure* TMBad::global::Rep< Operator1 >::compress ( )
inline

Attempt to apply input compression to this Rep operator.

Try to convert this operator to a global::RepCompress operator. If conversion fails return NULL.

Definition at line 1913 of file global.hpp.

Member Data Documentation

§ dependent_variable

template<class Operator1 >
const int TMBad::global::Rep< Operator1 >::dependent_variable = Operator1::dependent_variable
static

Is output of this operator a dependent variable ?

Definition at line 1887 of file global.hpp.

§ have_forward_incr_reverse_decr

template<class Operator1 >
const bool TMBad::global::Rep< Operator1 >::have_forward_incr_reverse_decr = true
static

Have forward_incr and reverse_incr members been defined ?

Definition at line 1905 of file global.hpp.

§ have_forward_reverse

template<class Operator1 >
const bool TMBad::global::Rep< Operator1 >::have_forward_reverse = false
static

Have forward and reverse members been defined ?

Definition at line 1907 of file global.hpp.

§ have_input_size_output_size

template<class Operator1 >
const bool TMBad::global::Rep< Operator1 >::have_input_size_output_size = true
static

Have input_size and output_size members been defined ?

Definition at line 1895 of file global.hpp.

§ independent_variable

template<class Operator1 >
const int TMBad::global::Rep< Operator1 >::independent_variable = Operator1::independent_variable
static

Is output of this operator an independent variable ?

Definition at line 1885 of file global.hpp.

§ is_linear

template<class Operator1 >
const bool TMBad::global::Rep< Operator1 >::is_linear = Operator1::is_linear
static

Is this a linear operator ?

Definition at line 1889 of file global.hpp.


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