XAD documentation
Headers
All XAD data types and operations are defined in the xad namespace. For brevity, this namespace has been omitted in the reference section.
XAD provides a general header XAD/XAD.hpp, which includes all headers that are commonly needed to work with XAD. Typically, this is all that clients need to include. Among them are:
XAD/Complex.hpp- For using complex numbers with XAD data types (see Complex).XAD/Version.hpp- The version macros (see Version Information).XAD/Config.hppandXAD/Export.hpp- Generated when XAD is configured: the build options XAD was built with (see Build Options), and the export macros for a shared library build.
There are three additional headers provided that can be included on demand:
XAD/StdCompatibility.hpp- This header imports the XAD math functions into thestdnamespace, for compatibility reasons. It enables using constructs likestd::sin(x)wherexis an XAD type. Additionally, it also specialisesstd::numeric_limitsfor the XAD data types, so that it provides traits similar to the standard floating point types. This partially violates the C++ standard's "don't specialize std templates" rule but is necessary for integration with other libraries.XAD/Hessian.hpp- Imports methods for computing the Hessian matrix of a single output function into thexadnamespace.XAD/Jacobian.hpp- Imports methods for computing the Jacobian matrix of a function with multiple inputs and multiple outputs into thexadnamespace.
Optional JIT headers
When XAD is compiled with XAD_ENABLE_CODEGEN, which needs the separately licensed xad-codegen library, additional JIT headers are available (XAD/XAD.hpp includes XAD/JITCompiler.hpp and XAD/ABool.hpp):
XAD/JITCompiler.hpp- JIT recorder/executor (see JITCompiler).XAD/JITGraph.hpp- Graph representation (see JITGraph).XAD/JITBackendInterface.hpp- Backend interface (see JIT Backend Interface).XAD/JITGraphInterpreter.hpp- Reference interpreter backend (see JIT Backend Interface).XAD/ABool.hpp- Trackable boolean helper for comparisons/If(see ABool (JIT)).
Questions or issues: GitHub Discussions · issues. Would you rather we AAD-enabled your code? Get a free speed-up estimate.