yq = f.Forward(q, xq)
q > 0and
xq.size() == f.Domain(), uses the lower order Taylor coefficients and computes the
q-th order Taylor coefficients for all the variables in the operation sequence corresponding to
capacity_orderoperation allows you to control that amount of memory that is retained by an AD function object (to hold
Forwardresults for subsequent calculations).
It specifies the number of Taylor coefficient orders that are allocated in the AD operation sequence corresponding to
Forwardwith the maximum value of
Q, it should be faster to pre-allocate memory for these calls using
cequal to @(@ Q + 1 @)@. If you do no do this,
Forwardwill automatically allocate memory and will copy the results to a larger buffer, when necessary.
Note that each call to Dependent frees the old memory connected to the function object and sets the corresponding taylor capacity to zero.
qand higher (that are stored in
f), you can reduce the memory allocated to
q. Note that, if ta_hold_memory is true, this memory is not actually returned to the system, but rather held for future use by the same thread.
fis constructed with the syntax
, there is an implicit call to forward_zero with
ADFun<Base> f(x, y)
xqequal to the value of the independent variables when the AD operation sequence was recorded. This corresponds to
c == 1.