[ADOL-C] Signature of Hessian driver

Kshitij Kulshreshtha kshitij at math.upb.de
Tue Sep 23 04:46:46 EDT 2014


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Dear Philipp,

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.

Warm regards
Kshitij

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 
> http://list.coin-or.org/mailman/listinfo/adol-c
> 

- -- 
Dr. Kshitij Kulshreshtha

Institut für Mathematik,
Universität Paderborn,
Warburger Straße 100,
33098 Paderborn.

Büro: A3.235

Privatanschrift:
Arnikaweg 62
33100 Paderborn.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.22 (GNU/Linux)

iQEcBAEBAgAGBQJUITN2AAoJEDWYtU3xIcMo3BoH/RplQdQPKFd/I1Sz7irEpWiZ
/vtmIq1ww12aYgbubuniWK7ipL55gf2WhR7FG8xiF+yy8x4aDgcpq1qlHJZLImir
xsJnpJCOJsVYxGps2ju15jAR1o75o2O9kZZ8kKIr/xR9poVuL3SfL/T7Nyv/Mg1w
oSrbwgU+dMB22MX0At9s45ga8IHBmvsyDvIi2a0xT14KkU54yLBbDcDhaCuIecE7
azCZjcCQQ13YBYpModau6408U20SDh6xfFxvLfMF2JI6+h99D32pN8GKle247Jw9
f5gUToPFoitCJnAMyQK518sEpueWlHhvZkUxlU8eNzxIVFY81kBAWHQEAP3nDnU=
=Q0On
-----END PGP SIGNATURE-----


More information about the ADOL-C mailing list