26 #ifndef TILEDARRAY_EXTERNAL_EIGEN_H__INCLUDED
27 #define TILEDARRAY_EXTERNAL_EIGEN_H__INCLUDED
34 #include <TiledArray/config.h>
35 #include <madness/config.h>
37 TILEDARRAY_PRAGMA_GCC(diagnostic push)
38 TILEDARRAY_PRAGMA_GCC(system_header)
43 #if defined(EIGEN_USE_LAPACKE_STRICT) && defined(EIGEN_USE_LAPACKE)
44 #undef EIGEN_USE_LAPACKE
49 #if defined(EIGEN_USE_LAPACKE) || defined(EIGEN_USE_LAPACKE_STRICT)
50 #if !EIGEN_VERSION_AT_LEAST(3, 3, 7)
51 #error "Eigen3 < 3.3.7 with LAPACKE enabled may give wrong eigenvalue results"
52 #error "Either turn off EIGEN_USE_LAPACKE/EIGEN_USE_LAPACKE_STRICT or use Eigen3 3.3.7"
54 #endif // EIGEN_USE_LAPACKE || EIGEN_USE_LAPACKE_STRICT
56 TILEDARRAY_PRAGMA_GCC(diagnostic pop)
65 template <
class Archive,
typename Data>
67 template <
class Archive,
typename Data>
70 template <
class Archive,
typename Scalar,
int RowsAtCompileTime,
71 int ColsAtCompileTime,
int Options,
int MaxRowsAtCompileTime,
72 int MaxColsAtCompileTime>
75 Eigen::
Matrix<Scalar, RowsAtCompileTime, ColsAtCompileTime, Options,
76 MaxRowsAtCompileTime, MaxColsAtCompileTime>> {
79 const Eigen::Matrix<Scalar, RowsAtCompileTime, ColsAtCompileTime, Options,
80 MaxRowsAtCompileTime, MaxColsAtCompileTime>& t) {
81 ar& t.rows() & t.cols();
86 template <
class Archive,
typename Scalar,
int RowsAtCompileTime,
87 int ColsAtCompileTime,
int Options,
int MaxRowsAtCompileTime,
88 int MaxColsAtCompileTime>
91 Eigen::
Matrix<Scalar, RowsAtCompileTime, ColsAtCompileTime, Options,
92 MaxRowsAtCompileTime, MaxColsAtCompileTime>> {
95 Eigen::Matrix<Scalar, RowsAtCompileTime, ColsAtCompileTime, Options,
96 MaxRowsAtCompileTime, MaxColsAtCompileTime>& t) {
97 typename Eigen::Matrix<Scalar, RowsAtCompileTime, ColsAtCompileTime,
98 Options, MaxRowsAtCompileTime,
99 MaxColsAtCompileTime>::Index nrows(0),
102 t.resize(nrows, ncols);
110 #endif // TILEDARRAY_EXTERNAL_EIGEN_H__INCLUDED