Closed cgraeser closed 1 year ago
Update: I noticed that the updated manual is contained in the repository. But the set of documented drivers is still the same. Notice that the documentation of fos_reverse()
in short_ref.pdf
indicates that this is also an input variable only in contrast to the compiler warning that this is used for write access.
Thanks for this commit, everything should be fine.
This changes several input arguments for driver functions to
const
. The patch only touches the functions that are documented in the freely available documentation https://www3.math.tu-berlin.de/Vorlesungen/SS06/AlgoDiff/adolc-110.pdf.The changed parameters are documented to be input paramters. Hence declaring them const should be fine. In fact this required that some internal function arguments also had to be made
const
.This patch leaves out the functions that are ot documented in the linked manual. It also keeps the
lagrange
argument ofvec_jac()
non-const. Changing the latter would require to modify the 4th argument of the internalfos_reverse()
method. However, this argument is used for write access and hence thelagrange
parameter seems to be modified in fact.Disclaimer: While I tested all changes with
make test
(which does not lead to any compiler warnings aboutconst
-ness issues), I have no idea about the Adol-C internals. Hence all changes-especially to the internal methodsfos_forward()
,fos_forward_nk()
, andhos_reverse()
-should be carefully reviewed by someone how understands the internals.