From cec287bee61d67bd9b4f6d55d3d8fc14107599aa Mon Sep 17 00:00:00 2001 From: Brad Bell Date: Sat, 16 Nov 2024 09:14:02 -0700 Subject: [PATCH] master: move partial.xrst -> reverse.xrst, remove d, change nc_partial -> n_order --- include/cppad/local/var_op/csum_op.hpp | 11 +++------- include/cppad/local/var_op/load_op.hpp | 9 ++------- .../var_op/{partial.xrst => reverse.xrst} | 20 +++++++++++-------- 3 files changed, 17 insertions(+), 23 deletions(-) rename include/cppad/local/var_op/{partial.xrst => reverse.xrst} (62%) diff --git a/include/cppad/local/var_op/csum_op.hpp b/include/cppad/local/var_op/csum_op.hpp index 37079a332..d0512a6db 100644 --- a/include/cppad/local/var_op/csum_op.hpp +++ b/include/cppad/local/var_op/csum_op.hpp @@ -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 } @@ -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 diff --git a/include/cppad/local/var_op/load_op.hpp b/include/cppad/local/var_op/load_op.hpp index 4cc61fa78..27314496d 100644 --- a/include/cppad/local/var_op/load_op.hpp +++ b/include/cppad/local/var_op/load_op.hpp @@ -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. @@ -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 } diff --git a/include/cppad/local/var_op/partial.xrst b/include/cppad/local/var_op/reverse.xrst similarity index 62% rename from include/cppad/local/var_op/partial.xrst rename to include/cppad/local/var_op/reverse.xrst index 2966751dd..d6ffcc5dc 100644 --- a/include/cppad/local/var_op/partial.xrst +++ b/include/cppad/local/var_op/reverse.xrst @@ -3,22 +3,25 @@ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-or-later SPDX-FileCopyrightText: Bradley M. Bell 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 @@ -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@ .