Skip to content

Commit

Permalink
master: move partial.xrst -> reverse.xrst, remove d, change nc_partia…
Browse files Browse the repository at this point in the history
…l -> n_order
  • Loading branch information
bradbell committed Nov 16, 2024
1 parent 5619feb commit cec287b
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 23 deletions.
11 changes: 3 additions & 8 deletions include/cppad/local/var_op/csum_op.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -410,14 +410,9 @@ see
:ref:`var_csum_op@i_z` ,
:ref:`var_csum_op@arg`
d
*
order the highest order Taylor coefficient that we are computing
the partial derivatives with respect to.
{xrst_comment H(x, y, ...) = G[ z(x, y), x, y, ... ] }
{xrst_comment document n_order, partial}
{xrst_template ;
include/cppad/local/var_op/partial.xrst
include/cppad/local/var_op/reverse.xrst
@x, y@ ; x, y, u, v
}
Expand Down Expand Up @@ -680,7 +675,7 @@ inline void csum_reverse_hes(
------------------------------------------------------------------------------
{xrst_begin var_csum_forward_hes dev}
Reverse Hessian Sparsity for Cumulative Summation
Forward Hessian Sparsity for Cumulative Summation
#################################################
Prototype
Expand Down
9 changes: 2 additions & 7 deletions include/cppad/local/var_op/load_op.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -403,11 +403,6 @@ y
*
see :ref:`var_load_op@y`
d
*
highest order the Taylor coefficient that we are computing the partial
derivative with respect to.
cap_order
*********
number of columns in the matrix containing the Taylor coefficients.
Expand All @@ -418,9 +413,9 @@ This vector maps the load instruction index *arg* [2] to the corresponding
*y* variable index.
If this index is zero, *y* is a parameter (not a variable).
{xrst_comment H(y, ...) = G[ z(y), y, ... ] }
{xrst_comment document n_order, partial}
{xrst_template ;
include/cppad/local/var_op/partial.xrst
include/cppad/local/var_op/reverse.xrst
@x, y@ ; y
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,22 +3,25 @@ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-or-later
SPDX-FileCopyrightText: Bradley M. Bell <[email protected]>
SPDX-FileContributor: 2024 Bradley M. Bell

This xrst template file documents the following reverse mode arguments:
n_order, partial

This template file has the following parameters:
@x, y@ : arguments (without parenthesis) to function for this operator;
e.g., if 'x , y' funciton is 'z(x, y)' .
@x, y@ : The arguments, without parenthesis, in function for this operator;
e.g., if @x, y@ is replaced by 'x , y', the funciton is 'z(x, y)' .
}

nc_partial
**********
is the number of columns (also number of orders) in the matrix containing
the partial derivatives with respect to the Taylor coefficients.
n_order
*******
is the number of Taylor coefficient orders that we are
computing the partial derivatives with respect to.

partial
*******
The partial derivative with respect to the order *k* Taylor coefficient
for the variable with index *j* is::

partial[ j * nc_partial + k ]
partial[ j * n_order + k ]

We use :math:`G( z, @x, y@, \ldots )` to denote a scalar valued function
of the taylor coefficients of the variables with index less than or
Expand All @@ -33,4 +36,5 @@ On input, *partial* contains the partial derivatives of *G*
with respect to the Taylor coefficients of the arguments to *G* .
On output, *partial* contains the partial derivatives of *H*
with respect to the Taylor coefficients of the arguments to *H* .
If @x, y@ is a parameter, it does not have Taylor coefficients.
We only compute partials with respect to variables; i.e.,
no partials are computed with respect to the parameters in @x, y@ .

0 comments on commit cec287b

Please sign in to comment.