{"id":32177485,"url":"https://github.com/joaoleal/cppadcodegen","last_synced_at":"2025-10-21T20:08:08.675Z","repository":{"id":2109770,"uuid":"3051516","full_name":"joaoleal/CppADCodeGen","owner":"joaoleal","description":"Source Code Generation for Automatic Differentiation using Operator Overloading","archived":false,"fork":false,"pushed_at":"2025-05-03T16:07:06.000Z","size":15476,"stargazers_count":180,"open_issues_count":16,"forks_count":39,"subscribers_count":10,"default_branch":"master","last_synced_at":"2025-05-03T17:20:35.229Z","etag":null,"topics":["algorithmic-differentation","automatic-differentiation","c-plus-plus","dae","differentiation","jit","latex","mathml"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/joaoleal.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"COPYING","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":"AUTHORS","dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2011-12-26T12:26:02.000Z","updated_at":"2025-05-03T16:07:11.000Z","dependencies_parsed_at":"2024-06-16T17:07:15.942Z","dependency_job_id":"34ad549d-259d-4374-b36d-25af657d57c1","html_url":"https://github.com/joaoleal/CppADCodeGen","commit_stats":{"total_commits":944,"total_committers":18,"mean_commits":52.44444444444444,"dds":0.4459745762711864,"last_synced_commit":"fde37524852ddad7e54dd546b4d8bd8a9b930d76"},"previous_names":[],"tags_count":15,"template":false,"template_full_name":null,"purl":"pkg:github/joaoleal/CppADCodeGen","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joaoleal%2FCppADCodeGen","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joaoleal%2FCppADCodeGen/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joaoleal%2FCppADCodeGen/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joaoleal%2FCppADCodeGen/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/joaoleal","download_url":"https://codeload.github.com/joaoleal/CppADCodeGen/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joaoleal%2FCppADCodeGen/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":280325322,"owners_count":26311424,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-21T02:00:06.614Z","response_time":58,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["algorithmic-differentation","automatic-differentiation","c-plus-plus","dae","differentiation","jit","latex","mathml"],"created_at":"2025-10-21T20:08:06.282Z","updated_at":"2025-10-21T20:08:08.667Z","avatar_url":"https://github.com/joaoleal.png","language":"C++","readme":"# CppADCodeGen [![CircleCI](https://circleci.com/gh/joaoleal/CppADCodeGen/tree/master.svg?style=svg)](https://circleci.com/gh/joaoleal/CppADCodeGen/tree/master) [![DOI](https://zenodo.org/badge/20828/joaoleal/CppADCodeGen.svg)](https://zenodo.org/badge/latestdoi/20828/joaoleal/CppADCodeGen) [![Documentation](https://codedocs.xyz/joaoleal/CppADCodeGen.svg)](https://codedocs.xyz/joaoleal/CppADCodeGen/) [![License](https://img.shields.io/badge/License-EPL%201.0-blue.svg)](https://opensource.org/licenses/EPL-1.0) [![License: GPL v3](https://img.shields.io/badge/License-GPL%20v3-blue.svg)](http://www.gnu.org/licenses/gpl-3.0)\n\nCppADCodeGen is a C++ library that extends [CppAD](http://www.coin-or.org/CppAD) \nto allow the generation of C/C++ source code for computing the derivatives of\nmathematical models using Algorithmic Differentiation (AD).\nSince CppAD uses operator-overloading and CppADCodeGen produces source-code,\nthe result is **hybrid Automatic Differentiation**.\n\nThe evaluation of differential information can be orders of magnitude faster\nto compute using a compiled model than using a regular operator-overloading\nstrategy.\n\n## Key Features ##\n\n - Code Generation:\n   - C/C++: It can be used to compute derivatives of functions/models (see [wiki](https://github.com/joaoleal/CppADCodeGen/wiki/DirectSourceGeneration#c-language)) and generate libraries (see [wiki](https://github.com/joaoleal/CppADCodeGen/wiki/LibGeneration)).\n   - [Latex](http://www.latex-project.org/): Latex sources can be used to create PDF files for documentation purposes (see [wiki](https://github.com/joaoleal/CppADCodeGen/wiki/DirectSourceGeneration#latex)).\n   - html+[MathML](http://www.w3.org/Math/): tml+MathML can be used to display your algorithm in a web browser (see [wiki](https://github.com/joaoleal/CppADCodeGen/wiki/DirectSourceGeneration#htmlmathmljavascript)).\n   - [dot](https://en.wikipedia.org/wiki/DOT_%28graph_description_language%29) source-code: dot files can be used to create images with a graph of your model\n     (see [graphviz](http://graphviz.org/)).\n - Support for Multiple Types: Allows the creation of CppAD models using double or float floating-point types.\n - Efficient Sparsity Handling: Supports generation of code optimized for sparse Jacobians and Hessians.\n - Differentiation index reduction of Differential Algebraic Equations (DAE) through:\n   - Pantelides,\n   - Soares-Secchi, and\n   - Dummy Derivatives methods.\n - **Statically compile** generated source-code at runtime can be using an existing compiler and linked\n   dynamically or, alternatively, \n - Generated source-code can be **JIT** compilation using Clang/LLVM.\n\n## License ##\n\nCppADCodeGen is available with both the **EPL** and **GPL** licenses\n(suitable for both open-source and closed-source commercial projects).\nSee epl-v10.txt and gpl3.txt for a copy of the licenses.\n\n## Requirements ##\n\nCppADCodeGen is a C++14 header only library, therefore there aren't many dependencies:\n\n - Required:\n   - [**CppAD**](https://github.com/coin-or/CppAD) (2024),\n   - A **C++14** compiler (such as GCC and Clang),\n - Optional:\n   - Clang/LLVM (only required for JIT compilation; supported versions \u003c= v10.0), and\n   - [Eigen 3](https://gitlab.com/libeigen/eigen) (required when DAE differentiation index reduction is used).\n\nRuntime compilation and dynamic linking:\n - Linux \n\nIt might be very easy to support other OSes, but it is not implemented yet.\n\n## Installing ##\n\n### General installation ###\n\nGet the sources from GitHub:\n```sh\ngit clone https://github.com/joaoleal/CppADCodeGen.git CppADCodeGen\n```\nCreate a new folder to build the project:\n```sh\nmkdir cppadcg-build\n```\nBuild the project (no compilation of C/C++ occurs, just generation of header files):\n```sh\ncd cppadcg-build\ncmake ../CppADCodeGen\n```\nEither install the project in your system:\n```sh\nmake install\n```\nor to some other folder:\n```sh\nmake DESTDIR=someotherfolder install\n```\n\n### Debian/Ubuntu ###\n\nA debian installation package can be created at the root of the project.\nTypically, you can create the installer by just typing:\n```sh\ndpkg-buildpackage\n```\nIt will create a debian package outside the project's folder.\n\n## Using CppADCodeGen ##\n\nSee the [wiki](https://github.com/joaoleal/CppADCodeGen/wiki).\n\nThe folder example includes some simple use cases.\n\n## Testing ##\n\nGet the sources from GitHub:\n```sh\ngit clone https://github.com/joaoleal/CppADCodeGen.git CppADCodeGen\n```\nCreate a new folder for the tests:\n```sh\ncd make-build-debug\ncmake ../CppADCodeGen\n```\nTesting requires [google-test](https://github.com/google/googletest) (version 1.14.0) which will be downloaded from GitHub.\n\nThen compile the tests:\n```sh\nmake build_tests\n```\n\nRun the complete set of tests:\n```sh\nmake test\n```\nIf [valgrind](https://valgrind.org/) is available in your system, CppADCodeGen will also perform memory checks which can\nlead to a very lengthy test execution.\nIt is possible to disable memory validations by turning off the CMake option `USE_VALGRIND`.\nFor instance, by calling the following command before running the tests:\n```sh\ncmake -DUSE_VALGRIND=OFF ../CppADCodeGen \n```\n---\n\n## Repository Content\n\n|Directories |  Description                                                    |\n|------------|-----------------------------------------------------------------|\n|bin         | Helper shell and sed scripts used for CppAD development.        |\n|bug         | Directory containing demonstration of known bugs (may be empty).|\n|debian      | Debian package creation files (Linux).                          |\n|doc         | Holds files for generation of developer documentation.          |\n|example     | CppADCodegen example files are here.                            |\n|include     | The CppADCodeGen header files.                                  |\n|pkgconfig   | pkg-config support files.                                       |\n|python      | Pretty printers for GDB (debugging).                            |\n|speed       | Contains some benchmarks for CppADCodeGen.                      |\n|test        | Contains tests for CppADCodeGen.                                |\n\n\n| Files         |  Description                                                 |\n|---------------|--------------------------------------------------------------|\n|AUTHORS        | Statement of authorship and copyright.                       |\n|CMakeLists.txt | CppADCodeGen CMake input file.                               |\n|COPYING        | Statement of user license to use software.                   |\n|epl-v10.txt    | A copy of the Eclipse Public License version 1.              |\n|gpl3.txt       | A copy of the GNU General Public License version 3.          |\n|INSTALL        | Points to this file.                                         |\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjoaoleal%2Fcppadcodegen","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjoaoleal%2Fcppadcodegen","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjoaoleal%2Fcppadcodegen/lists"}