Back to directory

CppADCodeGen

A C++ library that extends CppAD to generate C/C++ source code for computing derivatives of mathematical models, combining operator-overloading with compiled, source-generated derivatives.

CppADCodeGen

CppADCodeGen extends the CppAD automatic differentiation library so that, instead of only evaluating derivatives through operator overloading, it can generate C/C++ source code that computes them, which the project describes as a hybrid form of automatic differentiation. Evaluating a compiled derivative model this way can be orders of magnitude faster than a plain operator-overloading approach.

Besides C/C++ source, it can generate LaTeX for documentation, HTML with MathML for displaying an algorithm in a browser, and dot source files for graphing a model with Graphviz. It supports both double and float model types, efficient handling of sparse Jacobians and Hessians, and differentiation-index reduction for Differential Algebraic Equations using several named methods. Generated source can be compiled statically ahead of time and linked, or JIT-compiled at runtime using Clang/LLVM. It is a header-only C++14 library requiring CppAD and a C++14 compiler, with Clang/LLVM needed only for JIT compilation and Eigen 3 needed only for DAE index reduction, and is dual-licensed under the EPL and GPL so it can be used in open-source or closed-source projects.

More in Libraries

See all 292
  • OpenDecision

    deepanwadhwa.github.io

    An open-source Python package that answers typed questions about application state or documents using a local natural-language-inference model, returning structured choice, score, yes/no or evidence-relation values instead of free text.

  • TradeCanvas

    bonguynvan.github.io

    A zero-dependency canvas charting engine for building TradingView-style trading charts in JavaScript, with 66 technical indicators, 24 drawing tools, 17 chart types, and real-time streaming.

  • 3d retro graphics

    3d-retro.com

    A free, CC0-licensed library of copy-paste retro 3D and demoscene graphics effects, such as plasma, raytracing, and voxel terrain, runnable as WebGL 1 or plain 2D canvas.