[ADOL-C] Wrapper around adouble
João Leal
joaoruileal at gmail.com
Thu Sep 15 04:25:28 EDT 2011
Hello!
I am currently developing a modeling library that makes heavy use of adolc.
Since I do not know a priori whether or not a variable is constant (neither
dependent nor independent) almost all variables are defined as adoubles.
Would it be a good idea to create a wrapper around adoubles that would
internally also contain a double?
The idea would be:
############
adouble a = 3;
double b = 5;
Wrapper c = b; // the wrappers holds a double (no tapping)
Wrapper d = 5.0; // the wrappers holds a double (no tapping)
c = 4*2 + d; // the wrappers still holds a double (no tapping)
c += a; // now it holds an adouble (tapped)
###########
Does this make any sense?
Does adolc internally already do this?
Best regards,
--
João Leal
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://list.coin-or.org/pipermail/adol-c/attachments/20110915/cda2e252/attachment.html>
More information about the ADOL-C
mailing list