CppAD: A C++ Algorithmic Differentiation Package
20171217
|
struct_size_pair CppAD::local::optimize::record_csum | ( | const player< Base > * | play, |
const vector< struct_opt_op_info > & | opt_op_info, | ||
const CppAD::vector< struct struct_old2new > & | old2new, | ||
size_t | current, | ||
recorder< Base > * | rec, | ||
struct_csum_stacks & | work | ||
) |
Recording a cummulative cummulative summation.
play | player object corresponding to the old recroding. |
opt_op_info | mapping from old index to operator index to operator information |
old2new | mapping from old operator index to information about the new recording. |
current | is the index in the old operation sequence for the variable corresponding to the result for the current operator. We use the notation i_op = play->var2op(current). It follows that NumRes( opt_op_info[i_op].op ) > 0. If 0 < j_op < i_op, either opt_op_info[j_op].usage == csum_usage, opt_op_info[j_op].usage = no_usage, or old2new[j_op].new_var != 0. |
rec | is the object that will record the new operations. |
work | Is temporary work space. On input and output, work.op_stack, work.add_stack, and work.sub_stack, are all empty. These stacks are passed in so that they are created once and then be reused with calls to record_csum. |
Definition at line 63 of file record_csum.hpp.
Referenced by optimize_run().