UtilsLite
Utilities for C++ programming
Loading...
Searching...
No Matches
Utils_eigen.hh
Go to the documentation of this file.
1/*--------------------------------------------------------------------------*\
2 | |
3 | Copyright (C) 2017 |
4 | |
5 | , __ , __ |
6 | /|/ \ /|/ \ |
7 | | __/ _ ,_ | __/ _ ,_ |
8 | | \|/ / | | | | \|/ / | | | |
9 | |(__/|__/ |_/ \_/|/|(__/|__/ |_/ \_/|/ |
10 | /| /| |
11 | \| \| |
12 | |
13 | Enrico Bertolazzi |
14 | Dipartimento di Ingegneria Industriale |
15 | Università degli Studi di Trento |
16 | email: enrico.bertolazzi@unitn.it |
17 | |
18\*--------------------------------------------------------------------------*/
19
20//
21// file: Utils_eigen.hh
22//
23#pragma once
24
25#ifndef DOXYGEN_SHOULD_SKIP_THIS
26
27#ifndef UTILS_EIGEN_dot_HH
28#define UTILS_EIGEN_dot_HH
29
30#include "Utils.hh"
31#include "Utils_fmt.hh"
32
33#ifdef __clang__
34 #pragma clang diagnostic ignored "-Wdeprecated-copy-with-dtor"
35 #pragma clang diagnostic ignored "-Wdocumentation-unknown-command"
36 #pragma clang diagnostic ignored "-Wold-style-cast"
37 #pragma clang diagnostic ignored "-Wmissing-noreturn"
38 #pragma clang diagnostic ignored "-Wzero-as-null-pointer-constant"
39 #pragma clang diagnostic ignored "-Wused-but-marked-unused"
40 #pragma clang diagnostic ignored "-Wglobal-constructors"
41 #pragma clang diagnostic ignored "-Wextra-semi"
42 #pragma clang diagnostic ignored "-Wunused-template"
43#endif
44
45#ifdef _MSC_VER
46 #pragma warning( disable : 4127 )
47#endif
48
49#ifndef EIGEN_DONT_PARALLELIZE
50 #define EIGEN_DONT_PARALLELIZE
51#endif
52
53#ifndef EIGEN_NO_AUTOMATIC_RESIZING
54 #define EIGEN_NO_AUTOMATIC_RESIZING
55#endif
56
57#include "Utils/3rd/Eigen/Core"
58#include "Utils/3rd/Eigen/Dense"
59#include <type_traits>
60
61#ifndef DOXYGEN_SHOULD_SKIP_THIS
62
63namespace fmt {
64 template <typename TYPE, int ROW, int COL>
65 struct formatter<Eigen::Matrix<TYPE,ROW,COL>> : ostream_formatter {};
66
67 template <typename PlainObjectType, int MapOptions, typename StrideType>
68 struct formatter<Eigen::Map<PlainObjectType,MapOptions,StrideType>> : ostream_formatter {};
69
70 template <typename MAT>
71 struct formatter<Eigen::Transpose<MAT>> : ostream_formatter {};
72
73 template <typename EXPR>
74 struct formatter<Eigen::WithFormat<EXPR>> : ostream_formatter {};
75}
76
77#endif
78
79#endif
80
81#endif
82
83//
84// eof: Utils_eigen.hh
85//