All Projects → joaoleal → Cppadcodegen

joaoleal / Cppadcodegen

Licence: other
Source Code Generation for Automatic Differentiation using Operator Overloading

Projects that are alternatives of or similar to Cppadcodegen

Nx
Multi-dimensional arrays (tensors) and numerical definitions for Elixir
Stars: ✭ 1,133 (+1371.43%)
Mutual labels:  jit
Mathview
One stop for all Math formula and Science equation rendering in Android
Stars: ✭ 71 (-7.79%)
Mutual labels:  latex
Laravel Smartmd
🎯 A simple markdown editor compatible most markdown parse,You can choose any parse methods on server or client,like Mathematical formula、flowchart、upload image...
Stars: ✭ 76 (-1.3%)
Mutual labels:  latex
Latex2mathml
Pure Python library for LaTeX to MathML conversion
Stars: ✭ 65 (-15.58%)
Mutual labels:  latex
Csu Thesis
中南大学学术论文LaTex模板。Central South University Thesis LaTeX Template.
Stars: ✭ 70 (-9.09%)
Mutual labels:  latex
Arxiv Vanity
Renders papers from arXiv as responsive web pages so you don't have to squint at a PDF.
Stars: ✭ 1,190 (+1445.45%)
Mutual labels:  latex
Latex Template Cn
\LaTeX 中文模版收集。
Stars: ✭ 1,111 (+1342.86%)
Mutual labels:  latex
Pandoc Letter Din5008
Pandoc template for writing Markdown letters (DIN 5008)
Stars: ✭ 77 (+0%)
Mutual labels:  latex
Jit Compiler
JIT compiler in Go
Stars: ✭ 70 (-9.09%)
Mutual labels:  jit
Coc Vimtex
vimtex integration for coc.nvim
Stars: ✭ 74 (-3.9%)
Mutual labels:  latex
Milewski Ctfp Pdf
Bartosz Milewski's 'Category Theory for Programmers' unofficial PDF and LaTeX source
Stars: ✭ 9,037 (+11636.36%)
Mutual labels:  latex
Tufte Latex
A Tufte-inspired LaTeX class for producing handouts, papers, and books
Stars: ✭ 1,161 (+1407.79%)
Mutual labels:  latex
Jekyll Katex
Jekyll plugin for easy server-side math rendering via KaTeX
Stars: ✭ 73 (-5.19%)
Mutual labels:  latex
Latex3
The LaTeX3 Development Repository
Stars: ✭ 1,138 (+1377.92%)
Mutual labels:  latex
Latex Homework Class
A class for homework assignments written in LaTeX.
Stars: ✭ 76 (-1.3%)
Mutual labels:  latex
Whale
Hook Framework for Android/IOS/Linux/MacOS
Stars: ✭ 1,128 (+1364.94%)
Mutual labels:  jit
Omeinsum.jl
One More Einsum for Julia! With runtime order-specification and high-level adjoints for AD
Stars: ✭ 72 (-6.49%)
Mutual labels:  automatic-differentiation
Mathematical modeling
🎊 Mathematical Modeling Algorithms and Applications
Stars: ✭ 78 (+1.3%)
Mutual labels:  latex
Latexdiagrams
Latex Diagrams that I have generated/taken from internet.
Stars: ✭ 77 (+0%)
Mutual labels:  latex
Foliant
Comprehensive markdown-based documentation toolkit
Stars: ✭ 74 (-3.9%)
Mutual labels:  latex

CppADCodeGen Build Status DOI Documentation License License: GPL v3

CppADCodeGen performs hybrid Automatic Differentiation (AD), that is, uses operator-overloading and produces source-code. Such source-code can be statically compiled at runtime using an existing compiler and linked dynamically or, alternatively, go through a JIT compilation using Clang/LLVM.

The evaluation of differential information can be orders of magnitude faster to compute using a compiled model than using a regular operator overloading strategy.

In addition to C source generation, CppADCodeGen can also produce Latex, html+MathML, and dot source-code files for your algorithm. Latex sources can be used to create PDF files for documentation purposes, html+MathML can be used to display your algorithm in a web browser, and dot files can be used to create images with a graph of your model (see graphviz).

CppADCodeGen can also be used to perform differentiation index reduction of Differential Algebraic Equations (DAE) through Pantelides, Soares-Secchi, and Dummy Derivatives methods.

CppADCodeGen is built on top of the CppAD library, which is a header only C++ AD library using operator overloading.

License

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.

Requirements

CppADCodeGen is a C++14 header only library, therefore there aren't many dependencies:

  • CppAD (2020),
  • A C++14 compiler (such as GCC and Clang),
  • Clang/LLVM (only required for JIT compilation), and
  • Eigen 3 (required when DAE differentiation index reduction is used).

Runtime compilation and dynamic linking:

  • Linux (it might be very easy to support other OSes but it is not implemented yet)

Installing

General installation

Get the sources from GitHub:

    git clone https://github.com/joaoleal/CppADCodeGen.git CppADCodeGen

Create a new folder to build the project:

    mkdir cppadcg-build

Build the project (no compilation of C/C++ occurs, just generation of header files):

    cd cppadcg-build
    cmake ../CppADCodeGen

Either install the project in your system:

    make install

or to some other folder:

    make DESTDIR=someotherfolder install

Debian/Ubuntu

A debian installation package can be created at the root of the project. Typically you can create the installer by just typing:

    dpkg-buildpackage

It will create a debian package outside the project's folder.

Using CppADCodeGen

See the wiki.

The folder example includes some simple use cases.

Testing

Get the sources from GitHub:

    git clone https://github.com/joaoleal/CppADCodeGen.git CppADCodeGen

Create a new folder for the tests:

    cd make-build-debug
    cmake ../CppADCodeGen

Testing requires google-test (version 1.8.1). Either install it in your system or configure CppADCodeGen to download the sources from GitHub by replacing the previous line with:

    cmake -DGOOGLETEST_GIT=ON ../CppADCodeGen 

Then compile the tests:

    make build_tests

Run the complete set of tests:

    make test

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:

    cmake -DUSE_VALGRIND=OFF ../CppADCodeGen 

Repository Content

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.
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].