Bitwise collection of selected operator flags.
More...
#include <global.hpp>
|
bool | test (op_flag f) const |
| Test if a given flag is set.
|
|
Bitwise collection of selected operator flags.
These flags are available for any operator in the operation_stack
.
Definition at line 732 of file global.hpp.
§ op_flag
Enumeration of selected boolean flags in global::Operator
Enumerator |
---|
dynamic | Does this operator require dynamic allocation ?
|
smart_pointer | Is this operator a 'smart pointer' (with reference counting) ?
|
is_linear | Is this a linear operator ?
|
is_constant | Is this a constant operator ?
|
independent_variable | Is output of this operator an independent variable ?
|
dependent_variable | Is output of this operator a dependent variable ?
|
allow_remap | Is it safe to remap the inputs of this operator?
In general it is illegal to remap operators that assume a certain memory layout of its inputs, e.g. BLAS routines. Make sure to set to false for those cases.
|
elimination_protected | Protect this operator from elimination by the tape optimizer ?
|
updating | This operator may update existing variables ?
An 'updating' operator is allowed to update (increment/decrement) certain ('updatable') variables already on the tape. In general this property breaks basic principles of reverse mode AD unless the following extra requirement is satisfied:
- Once an updatable variable have been read it may no longer be updated.
This requrement always holds for the derivative variables during reverse replay. We note that 'updating' operators are considered an extension to the standard AD framework. In particular, a more complex dependency anlysis is required:
- Updating operators must have
implicit_dependencies=true .
- The
updating flag must be inherited by derivatives.
- The
updating flag signifies that necessary derivative workspaces are added to the tape prior to any reverse replay.
- An
updating operator must implement the member dependencies_updating() defining which variables are updated.
|
op_flag_count | Mark end of enum.
|
Definition at line 738 of file global.hpp.
The documentation for this struct was generated from the following files:
License: