CoDiPack – Code Differentiation Package

CoDiPack is a C++-library that enables the computation of gradients in computer programs using Algorithmic Differentiation. It is based on the Operator Overloading approach and uses static polymorphism and expression templates, resulting in an extremely fast evaluation of adjoints or forward derivatives. It is specifically designed with HPC applications in mind.


  • Reverse and Forward mode derivatives.
  • Jacobian and primal value taping approaches.
  • Higher order derivatives.
  • Vector mode.
  • Various index management schemes:
    • Linear: C memory operation compatible
    • Reuse: Improved vector mode performance
  • MPI communication using MeDiPack.
  • OpenMP parallelism using OpDiLib.
  • External function interface.

Ease of access structures:

  • Jacobian and hessian helper: Compute derivatives for small functions objects e.g. lambda functions
  • Preaccumulation: Optimize memory for small functions.
  • External functions: Removes the need to understand internal CoDiPack structures for external functions
  • Higher order access: Simplified access to higher order derivatives

CoDiPack is released as Open-Source under GPL3.
Documentation and Tutorials can be found here.

Most recent stable version: 2.2.0
Current status of development branch: Build Status

Lead Developers: Max Sagebaum, Johannes Bl├╝hdorn, Tim Albring
Responsibility: Prof. Nicolas R. Gauger


If you use CoDiPack in one of your applications and write a paper it would be nice if you could cite one of the following papers:


M. Sagebaum, T. Albring, N.R. Gauger

High-Performance Derivative Computations using CoDiPack Journal Article

In: ACM Transactions on Mathematical Software (TOMS), vol. 45, no. 4, 2019.

Links | BibTeX


M. Sagebaum; T. Albring; N. R. Gauger

Expression templates for primal value taping in the reverse mode of algorithmic differentiation Journal Article

In: Optimization Methods and Software, vol. 33, no. 4-6, pp. 1207-1231, 2018.

Links | BibTeX

This is a list of institutions which use CoDiPack:

  • National institutions (Germany):
    • BTU Cottbus-Senftenberg
    • Bosch Germany
    • DLR K├Âln
    • Enercon
    • Friedrich-Alexander-Universit├Ąt Erlangen-N├╝rnberg
    • Hochschule Coburg
    • Johannes Gutenberg-Universit├Ąt Mainz
    • Karlsruhe Institute of Technology
    • MTU Aero Engines
    • OTH Regensburg
    • RWTH Aachen
    • Siemens
    • TU Berlin
    • TU Braunschweig
    • TU Darmstadt
    • TU Dresden
    • TU M├╝nchen
    • Universit├Ąt Heidelberg
    • Universit├Ąt Kassel
    • Universit├Ąt Paderborn
    • Universit├Ąt Siegen
    • Universit├Ąt der Bundeswehr M├╝nchen
  • International institutions:
    • Bosch LLC Research and Technology Center North America
    • California Institute of Technology
    • Delft University of Technology
    • Imperial College London
    • Lucerne University of Applied Sciences and Arts
    • James Madison University
    • Lab. of New Concepts in Aeronautics at Tech. Institute of Aeronautics.
    • Lawrence Livermore National Laboratory
    • NASA
    • Polytechnic University of Milan
    • Stanford University
    • University of California
    • University of Liege
    • University of Twente