[ADOL-C] Signature of Hessian driver
kshitij at math.upb.de
Tue Sep 23 04:46:46 EDT 2014
-----BEGIN PGP SIGNED MESSAGE-----
these function signatures are extremely old and have been there since
before ADOL-C version 1.0. Also, they were meant to be callable from
Fortran 77. At the time the focus was on the correctness of the
derivatives and efficiency of the computation and not on good
programming practices. It mostly still is the same focus. So no one
bothered about adding const as that is simply a decorative thing in
general. Since then, no one has changed it so as to not break the
programming interface, which has been out there for so long. I'm not
sure when and why the const was added to the gradient() call, I'll try
to find out though.
On 2014-09-23 10:29, Philipp Bender wrote:
> Dear list,
> I wonder about the declaration of the hessian() function: why is
> the pointer to the values x not const, is there a special reason?
> The gradient() function for example leaves the input values const.
> drivers.h: ADOLC_DLL_EXPORT int
> hessian(short,int,double*,double**); ADOLC_DLL_EXPORT int
> gradient(short,int,const double*,double*);
> The same applies to function(), not const.
> Actually I have not tried to fix this because I am in a very early
> stage using ADOL-C, and I'm a little bit afraid of breaking it
> (making it compile, but get some strange side effects).
> Best regards, Philipp Bender
> _______________________________________________ ADOL-C mailing
> list ADOL-C at list.coin-or.org
Dr. Kshitij Kulshreshtha
Institut für Mathematik,
Warburger Straße 100,
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.22 (GNU/Linux)
-----END PGP SIGNATURE-----
More information about the ADOL-C