XAD is a comprehensive C++ library for automatic differentiation. It targets production-quality code at any scale, striving for both ease of use and high performance.
Automatic differentiation (also called algorithmic differentiation) is a set of techniques for calculating partial derivatives of functions specified as computer programs. Since every program execution is always composed of a sequence of simple operations with known derivatives (arithmetics and mathematical functions like sin, exp, log, etc.), the chain rule can be applied repeatedly to calculate partial derivatives automatically. XAD implements this using operator-overloading in C++, allowing to compute derivatives with minimal changes to the program. See automatic differentation mathematical background for more details.
Key features:
- Forward and adjoint mode for any order, using operator-overloading
- Checkpointing support (for tape memory management)
- External functions interface (to integrate external libraries)
- Thread-safe tape
- Formal exception-safety guarantees
- High performance
- Battle-tested in large production code bases
XAD is a C++ library built with modern CMake and has no external dependencies. For instructions how to build and integrate it into your projects, please refer to the Installation Guide.
The documentation site also contains tutorials, examples, and information about integrating XAD into QuantLib.
The sources for the site are located in the docs directory in this repository.
If you have found an issue, want to report a bug, or have a feature request, please raise a GitHub issue.
For general questions about XAD, sharing ideas, engaging with community members, etc, please use GitHub Discussions.
Please see the issues list for planned/open features. You are very welcome to contribute towards these (or other) features - please contact the project maintainers before to discuss you proposal. If you have new feature requests, please submit a new issue with a detailed description.
Please read CONTRIBUTING for the process of contributing to this project. Please also obey our Code of Conduct in all communication.
We use SemVer for versioning,
making a new release available as soon as sufficient new features have been merged into main.
The final decision about a release and which features are included is with the project maintainers.
For the versions available, see the releases in GitHub.
Every new version is also added to the Changelog, which needs to be maintained throughout the development. That is, every pull request should also update the Changelog accordingly.
- Various contributors from Xcelerit
- See also the list of contributors who participated in the project.
This project is licensed under the GNU Affero General Public License - see the LICENSE.md file for details.