The CppAD Wish List
Keywords: the cppad wish list base requirements printfor optimization checkpoint machine epsilon examples adolc optimizing nested conditional expressions forward mode recomputation iterator interface compilation speed operation sequence comparison changes software guidelines tracing atan2 benderquad

| Prev | Next |  |  |  |  | wish_list |

The CppAD Wish List
Base Requirements
Change the Base requirements to use template specialization instead of functions so that there is a default value for each function. The default would result in a known assert when the operation is used and not defined by the base class. An example of this type of template specialization can be found in the implementation of to_string .
PrintFor Optimization
Do not remove PrintFor operations during optimize because they are very useful when debugging expected calculations on the tape. If not this, we at least need to disable optimization of checkpoint functions.
checkpoint
There should be some examples and tests for both speed and memory use that demonstrate that checkpointing is useful.
Machine Epsilon in Examples
Use a multiple of `std::numeric_limits<double>::epsilon()` instead `1e-10` for a small number in correctness checks; e.g., see sqrt.cpp .
Adolc
Create a documentation page that shows how to convert Adolc commands to CppAD commands.
Optimizing Nested Conditional Expressions
If one optimizes the code `

         x = CondExpLt(left_x, right_x, true_x, false_x)
         y = CondExpGt(left_y, right_y, true_y, false_y)
         z = CondExpEq(left_z, right_z, x, y)

` only two of the expressions `true_x`, `false_x`, `true_y`, `false_y` will be evaluated (two will be skipped depending on the result of `left_z == right_z`). Not all of the expressions corresponding to `left_x`, `right_x`, `left_y`, `right_y` need to be evaluate, but they are. The optimizer could be improved to skip two more expressions (depending on the result of `left_z == right_z`).
Forward Mode Recomputation
If the results of forward_order have already been computed and are still stored in the ADFun object (see size_order ), then they do not need to be recomputed and the results can just be returned.
Iterator Interface
All of the CppAD simple vector interfaces should also have an iterator version for the following reasons:

1. It would not be necessary to copy information to simple vectors when it was originally stored in a different type of container.
2. It would not be necessary to reallocate memory for a result that is repeatedly calculated (because an iterator for the result container would be passed in).

Compilation Speed
One could build a CppAD library for use with the type `AD<double>`. This would speed up compilation for the most common usage where the `Base` type is `double`.
Operation Sequence
It is possible to detect if the AD of `Base` operation sequence does not depend on any of the independent variable values. This could be returned as an extra seq_property .
Comparison Changes and Optimization
The comparison operators used to not be taped when NDEBUG was defined. They are now taped so that the compare_change interface works even for compiler optimize code. This caused a significant slow down in the cppad_det_lu.cpp speed test (with no options specified). Perhaps there should be an option to skip the comparison taping.
Software Guidelines
The following is a list of some software guidelines taken from boost . These guidelines are not followed by the current CppAD source code, but perhaps they should be:

1. Names (except as noted below) should be all lowercase, with words separated by underscores. For example, acronyms should be treated as ordinary names (xml_parser instead of XML_parser).
2. Template parameter names should begin with an uppercase letter.
3. Use spaces rather than tabs. Currently, CppAD uses a tabs stops at column multiples of 5. Five columns were chosen to avoid high levels of indenting and to allow for `

            if( expression )
                 statement
            else statement

   ` with a tab after the else. Automatic conversion to actual spaces should be easy.

Tracing
Add tracing the operation sequence to the user API and documentation. Tracing the operation sequence is currently done by changing the CppAD source code. Use the command `

         grep '^# *define *CPPAD_.*_TRACE' cppad/local/*.hpp

` to find all the possible tracing flags.
atan2
The atan2 function could be made faster by adding a special operator for it.
BenderQuad
See the problem with the current `BenderQuad` specifications.

Input File: omh/wish_list.omh