
The TMB packages has a special version of the checkpoint class that enables one checkpoint function to be my multiple OpenMp threads. Perhaps it would be useful to extend the CppAD multi-threading environment to allow for this. In addition, perhaps a multi-threading version of an ADFun object would be useful.

Atomic

Subgraph
The subgraph_sparsity calculation treats each atomic function call as if all of its outputs depend on all of its inputs; see atomic function . These sparsity patterns could be made more efficient (could have fewer possibly non-zeros entries) by using the sparsity patterns for the atomic functions.

New API
A new API for atomic functions could be created that uses sparse_rc for sparsity patterns and an interface like       afun.jac_sparsity(select_domain, select_range, pattern_out)      afun.hes_sparsity(select_domain, select_range, pattern_out)  see subgraph_sparsity . This would be simpler for the user.

Sparsity
Add an atomic_option that checks if the sparsity patterns calculated by user atomic functions have elements for arguments that are know to be parameters and could be more efficient. For example, the user's version of for_sparse_jac could check x to see for which components are variables; i.e., isnan(x[j]) is true for a particular call. Note that vx should be removed, because the method above can be used to determine this information.

Element-wise Operations
Add user atomic functions for element-wise addition, subtraction, multiplication, and division. Where the operands are simple vectors with elements of type AD<Base> .

check_finite
1. Sometimes one only gets infinite value during zero order forward and nan when computing corresponding derivatives. Change check_for_nan to check_finite (not infinite or nan) so that error detection happens during zero order forward instead of later.
2. In addition, the current check_for_nan writes the corresponding zero order values to a temporary file. It would be nice if the check_finite routine made writing the zero order values optional.

test_boolofvoid
For general purpose use, the test_boolofvoid should be usable without including a memory check at the end.

Eigen
Use a wrapper class for eigen vectors so that the size member function returns a size_t instead of an int. This would allow TESTVECTOR to be a true template class; i.e., to use the syntax       TESTVECTOR<Scalar> 
Example
Split the example list into separate groups by the corresponding example subdirectory.

Optimization

Taping
Perhaps some of the optimization done while taping forward mode should be delayed to the optimization step.

Special Operators
Add special operators that can be implemented more efficiently, e.g.,       square(x) = x * x  and have the optimizer recognize when they should be used. (They could also be in the user API, but it would not be expected that the user would use them.)

Memory
The optimize command seems to use a lot of memory when the tape is large. We should create a test case that demonstrates this and then work on reducing the amount of memory needed by this operation.

checkpoint

Retape
Perhaps there should be a version of the checkpoint class that uses a tapeless AD package to compute the derivative values. This would allow for algorithms where the operations sequence depends on the independent variable values. There is a question as to how sparsity patterns would be determined in this case. Perhaps they would be passed into the constructor. If it was known to be constant, the user could compute the pattern using CppAD. Otherwise, the user could input a conservative estimate of the pattern that would be correct.

Testing
There should be some examples and tests for both speed and memory use that demonstrate that checkpointing is useful.

Compilation Speed
Create a library corresponding to AD<double> so that one does not need to re-compile all the header files every time.

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 .

Create a documentation page that shows how to convert Adolc commands to CppAD commands.

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).

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 .

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.

See the problem with the current BenderQuad specifications.