OpenKalman
eigen.hpp
Go to the documentation of this file.
1 /* This file is part of OpenKalman, a header-only C++ library for
2  * Kalman filters and other recursive filters.
3  *
4  * Copyright (c) 2019-2023 Christopher Lee Ogden <ogden@gatech.edu>
5  *
6  * This Source Code Form is subject to the terms of the Mozilla Public
7  * License, v. 2.0. If a copy of the MPL was not distributed with this
8  * file, You can obtain one at https://mozilla.org/MPL/2.0/.
9  */
10 
25 #ifndef OPENKALMAN_EIGEN_HPP
26 #define OPENKALMAN_EIGEN_HPP
27 
28 
29 #include <Eigen/Dense>
30 #include <unsupported/Eigen/CXX11/Tensor>
31 
32 
33 // Note: c++20 mode requires at least Eigen version 3.3.9. See Eigen Commit 7a0a2a500, which fixes issue #2012.
34 #if __cplusplus >= 202002L and not EIGEN_VERSION_AT_LEAST(3,3,9)
35 static_assert(true, "Eigen 3.3.9 required for c++20 or higher standard.");
36 #endif
37 
38 #if __cplusplus < 202002L and defined(__GNUC__)
39 #pragma GCC diagnostic push
40 #pragma GCC diagnostic ignored "-Wunknown-pragmas"
41 #pragma GCC diagnostic ignored "-Wignored-attributes"
42 #ifdef __clang__
43 #pragma clang diagnostic ignored "-Wunknown-attributes"
44 #endif
45 #endif
46 
47 #include "linear-algebra/interfaces/interfaces.hpp" // Includes basics.hpp
48 
53 namespace OpenKalman::Eigen3 {}
54 
55 
57 
60 
62 
63 #include "linear-algebra/interfaces/eigen/details/eigen-comma-initializers.hpp"
64 
65 #include "linear-algebra/interfaces/eigen/native-traits/eigen-native-traits.hpp"
66 #include "linear-algebra/interfaces/eigen/native-traits/eigen-general-native-traits.hpp"
67 
68 #include "linear-algebra/interfaces/eigen/native-evaluators/eigen-native-evaluators.hpp"
69 
70 #include "linear-algebra/interfaces/eigen/details/EigenAdapterBase.hpp"
71 
72 #if __cplusplus < 202002L and defined(__GNUC__)
73 #pragma GCC diagnostic pop
74 #endif
75 
76 // Introduce key Eigen3 interface functions into OpenKalman namespace.
77 namespace OpenKalman
78 {
79  using Eigen3::eigen_matrix_t;
80 }
81 
82 #include "default-overloads.hpp"
83 
84 #endif //OPENKALMAN_EIGEN_HPP
Forward declarations for OpenKalman&#39;s Eigen interface.
The root namespace for OpenKalman.
Definition: basics.hpp:34
Definition of function.
Definition: eigen-forward-declarations.hpp:22
An include file for every interface.
A header file defining Eigen3 as the default interface.
Header file for traits for Eigen3 classes.
Definition of eigen_wrapper and EigenWrapper alias.