votca 2025.1-dev
Loading...
Searching...
No Matches
eigen.h
Go to the documentation of this file.
1/*
2 * Copyright 2009-2020 The VOTCA Development Team
3 * (http://www.votca.org)
4 *
5 * Licensed under the Apache License, Version 2.0 (the "License")
6 *
7 * You may not use this file except in compliance with the License.
8 * You may obtain a copy of the License at
9 *
10 * http://www.apache.org/licenses/LICENSE-2.0
11 *
12 * Unless required by applicable law or agreed to in writing, software
13 * distributed under the License is distributed on an "AS IS" BASIS,
14 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 * See the License for the specific language governing permissions and
16 * limitations under the License.
17 *
18 */
19
20#ifndef VOTCA_TOOLS_EIGEN_H
21#define VOTCA_TOOLS_EIGEN_H
22
23// Local VOTCA includes
24#include "votca_tools_config.h"
25
26#ifdef APPLE_ACCELERATE_FOUND
27#include <lapacke.h>
28#define EIGEN_USE_BLAS
29#define EIGEN_USE_LAPACKE
30#endif
31
32#ifdef MKL_FOUND
33#include <mkl.h>
34#define EIGEN_USE_MKL_ALL
35#endif
36
37#if defined(FFTW3_FOUND) || defined(MKL_FOUND)
38#define EIGEN_FFTW_DEFAULT
39#endif
40
46#if (defined(__GNUC__) || defined(__GNUG__)) && \
47 !(defined(__clang__) || defined(__INTEL_COMPILER))
48#define STRICT_GNUC
49#define GCC_VERSION \
50 (__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__)
51#endif
52
53#if (defined STRICT_GNUC) && GCC_VERSION > 70000
54#pragma GCC diagnostic push
55#pragma GCC diagnostic ignored "-Wint-in-bool-context"
56#pragma GCC diagnostic ignored "-Wmaybe-uninitialized"
57#endif
58#include <Eigen/Eigen>
59#include <unsupported/Eigen/CXX11/Tensor>
60#include <unsupported/Eigen/FFT>
61#include <unsupported/Eigen/SparseExtra>
62#if (defined STRICT_GNUC) && GCC_VERSION > 70000
63#pragma GCC diagnostic pop
64#endif
65
66#endif // VOTCA_TOOLS_EIGEN_H