[CppAD] custom output streams with PrintOp
Iakov Nakhimovski
iakov.nakhimovski at gmail.com
Fri Aug 5 10:02:57 EDT 2011
Hello!
I’d like to propose support for custom output streams to be used with
PrintOp. Right now all the messages go to std::cout which is not
convenient in the case of DLL potentially run in multithreaded
context.
To enable the support I’d suggest either:
1. Adding ostream& to ADFun<Base> and player<Base> classes
complemented with appropriate set/get on the ADFun (default is
cstd::cout).
2. Optional ostream* parameter for “Forward” to be forwarded into
forward_sweep/forward0sweep (instead of the bool print). The parameter
is then propagated to PrintOp and used for printing (NULL pointer = no
output).
Thanks in advance!
/Iakov
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://list.coin-or.org/pipermail/cppad/attachments/20110805/777c29e6/attachment.html
More information about the CppAD
mailing list