[CppAD] Efficiency questions

Lars Struen Imsland Lars.Imsland at cybernetica.no
Thu Jan 8 09:47:34 EST 2009


In my problem, I have a function z = f(x,y), for which I need the
Jacobian wrt x, \frac{\partial f}{\partial x}. This Jacobian will be
evaluated many times, for varying x and y. Typical dimensions are 2 n_z
\approx n_x \approx n_y \approx 100.

 

I have implemented this using the Jacobian driver with x as independent
variable. I understand the Jacobian driver uses forward mode.

 

Q1: Will it be more efficient to use some reverse mode/driver (since n_z
is smaller than n_x)?

 

Presently, I retape the operations before each call to the Jacobian,
since y varies.

 

Q2: Will it be more efficient to do only one taping with x and y as
independent variables, and just pick out the relevant columns of the
Jacobian?

 

A more general question:

 

Q3: Since I will calculate the Jacobian _many_ times (presently with
retaping of the operations), should I worry about memory fragmentation?

 

So far, CppAD seems to work splendidly, and is very easy to use. Many
thanks to the developers.

 

TIA,

Lars

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://list.coin-or.org/pipermail/cppad/attachments/20090108/02bfc4ae/attachment.html 


More information about the CppAD mailing list