Grid 0.7.0
DisableWarnings.h
Go to the documentation of this file.
1/*************************************************************************************
2
3Grid physics library, www.github.com/paboyle/Grid
4
5Source file: ./lib/DisableWarnings.h
6
7Copyright (C) 2016
8
9Author: Guido Cossu <guido.cossu@ed.ac.uk>
10
11This program is free software; you can redistribute it and/or modify
12it under the terms of the GNU General Public License as published by
13the Free Software Foundation; either version 2 of the License, or
14(at your option) any later version.
15
16This program is distributed in the hope that it will be useful,
17but WITHOUT ANY WARRANTY; without even the implied warranty of
18MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19GNU General Public License for more details.
20
21You should have received a copy of the GNU General Public License along
22with this program; if not, write to the Free Software Foundation, Inc.,
2351 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
24
25See the full license in the file "LICENSE" in the top level distribution
26directory
27*************************************************************************************/
28/* END LEGAL */
29
30#ifndef DISABLE_WARNINGS_H
31#define DISABLE_WARNINGS_H
32
33
34
35#if defined __GNUC__ && __GNUC__>=6
36#pragma GCC diagnostic ignored "-Wignored-attributes"
37#endif
38
39 //disables and intel compiler specific warning (in json.hpp)
40#ifdef __ICC
41#pragma warning disable 488
42#endif
43
44#ifdef __NVCC__
45 //disables nvcc specific warning in json.hpp
46#pragma clang diagnostic ignored "-Wdeprecated-register"
47
48#ifdef __NVCC_DIAG_PRAGMA_SUPPORT__
49 //disables nvcc specific warning in json.hpp
50#pragma nv_diag_suppress unsigned_compare_with_zero
51#pragma nv_diag_suppress cast_to_qualified_type
52 //disables nvcc specific warning in many files
53#pragma nv_diag_suppress esa_on_defaulted_function_ignored
54#pragma nv_diag_suppress declared_but_not_referenced
55#pragma nv_diag_suppress extra_semicolon
56#else
57 //disables nvcc specific warning in json.hpp
58#pragma diag_suppress unsigned_compare_with_zero
59#pragma diag_suppress cast_to_qualified_type
60#pragma diag_suppress declared_but_not_referenced
61 //disables nvcc specific warning in many files
62#pragma diag_suppress esa_on_defaulted_function_ignored
63#pragma diag_suppress extra_semicolon
64#endif
65#endif
66
67// Disable vectorisation in Eigen on the Power8/9 and PowerPC
68#ifdef __ALTIVEC__
69#define EIGEN_DONT_VECTORIZE
70#endif
71#ifdef __VSX__
72#define EIGEN_DONT_VECTORIZE
73#endif
74
75#endif