|
CppADCodeGen
HEAD
A C++ Algorithmic Differentiation Package with Source Code Generation
|
CppADCodeGen is a C++ library that extends CppAD to allow the generation of C/C++ source code for computing the derivatives of mathematical models using Algorithmic Differentiation (AD). Since CppAD uses operator-overloading and CppADCodeGen produces source-code, the result is hybrid Automatic Differentiation.
The evaluation of differential information can be orders of magnitude faster to compute using a compiled model than using a regular operator-overloading strategy.
CppADCodeGen is available with both the EPL and GPL licenses (suitable for both open-source and closed-source commercial projects). See epl-v10.txt and gpl3.txt for a copy of the licenses.
CppADCodeGen is a C++14 header only library, therefore there aren't many dependencies:
Runtime compilation and dynamic linking:
It might be very easy to support other OSes, but it is not implemented yet.
Get the sources from GitHub:
Create a new folder to build the project:
Build the project (no compilation of C/C++ occurs, just generation of header files):
Either install the project in your system:
or to some other folder:
A debian installation package can be created at the root of the project. Typically, you can create the installer by just typing:
It will create a debian package outside the project's folder.
See the wiki.
The folder example includes some simple use cases.
Get the sources from GitHub:
Create a new folder for the tests:
Testing requires google-test (version 1.14.0) which will be downloaded from GitHub.
Then compile the tests:
Run the complete set of tests:
If valgrind is available in your system, CppADCodeGen will also perform memory checks which can lead to a very lengthy test execution. It is possible to disable memory validations by turning off the CMake option USE_VALGRIND. For instance, by calling the following command before running the tests:
| Directories | Description |
|---|---|
| bin | Helper shell and sed scripts used for CppAD development. |
| bug | Directory containing demonstration of known bugs (may be empty). |
| debian | Debian package creation files (Linux). |
| doc | Holds files for generation of developer documentation. |
| example | CppADCodegen example files are here. |
| include | The CppADCodeGen header files. |
| pkgconfig | pkg-config support files. |
| python | Pretty printers for GDB (debugging). |
| speed | Contains some benchmarks for CppADCodeGen. |
| test | Contains tests for CppADCodeGen. |
| Files | Description |
|---|---|
| AUTHORS | Statement of authorship and copyright. |
| CMakeLists.txt | CppADCodeGen CMake input file. |
| COPYING | Statement of user license to use software. |
| epl-v10.txt | A copy of the Eclipse Public License version 1. |
| gpl3.txt | A copy of the GNU General Public License version 3. |
| INSTALL | Points to this file. |