Drake
autodiff.h
Go to the documentation of this file.
1 #pragma once
2 
7 // In each header included below, it asserts that this macro
8 // `DRAKE_COMMON_AUTODIFF_HEADER` is defined. If the macro is not defined, it
9 // generates diagnostic warning messages.
10 #define DRAKE_COMMON_AUTODIFF_HEADER
11 
12 #include <Eigen/Core>
13 #include <unsupported/Eigen/AutoDiff>
14 
15 // Do not alpha-sort the following block of hard-coded #includes, which is
16 // protected by `clang-format on/off`.
17 //
18 // Rationale: We want to maximize the use of this header, `autodiff.h`, even
19 // inside of the autodiff-related files to avoid any mistakes which might not be
20 // detected. By centralizing the list here, we make sure that everyone will see
21 // the correct order which respects the inter-dependencies of the autodiff
22 // headers. This shields us from triggering undefined behaviors due to
23 // order-of-specialization-includes-changed mistakes.
24 //
25 // clang-format off
30 // clang-format on
31 #undef DRAKE_COMMON_AUTODIFF_HEADER
This file contains abbreviated definitions for certain uses of AutoDiffScalar that are commonly used ...
Overloads for STL mathematical operations on AutoDiffScalar.