Convert a player object to an optimized recorder object.
- Template Parameters:
-
Base | base type for the operator; i.e., this operation was recorded using AD< Base > and computations by this routine are done using type Base. |
- Parameters:
-
n | is the number of independent variables on the tape. |
dep_taddr | On input this vector contains the indices for each of the dependent variable values in the operation sequence corresponding to play. Upon return it contains the indices for the same variables but in the operation sequence corresponding to rec. |
play | This is the operation sequence that we are optimizing. It is essentially const, except for play back state which changes while it plays back the operation seqeunce. |
rec | The input contents of this recording does not matter. Upon return, it contains an optimized verison of the operation sequence corresponding to play. |
Definition at line 811 of file optimize.hpp.