Code Monkey home page Code Monkey logo

cppadcodegen's Introduction

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.

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++11 header only library, therefore there aren't many dependencies:

  • CppAD (2017),
  • A C++11 compiler (such as GCC and Clang),
  • Clang/LLVM (only for JIT compilation), and
  • Eigen 3 (only for DAE differentiation index reduction).

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.


Repository Content

Directories Description
bin Helper shell and sed scripts used for CppAD development.
bug Directory containing demonstration of known bugs (may be empty).
doc Holds files for generation of developer documentation.
debian Debian package creation files (Linux).
include The CppADCodeGen header files.
example CppADCodegen example files are here.
pkgconfig pkg-config support files.
test Contains tests for CppADCodeGen.
speed Contains some benchmarks 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.

cppadcodegen's People

Contributors

bradbell avatar joaoleal avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.