|
| 1 | +/************************************************************************************* |
| 2 | +
|
| 3 | +Grid physics library, www.github.com/paboyle/Grid |
| 4 | +
|
| 5 | +Source file: ./lib/DisableWarnings.h |
| 6 | +
|
| 7 | +Copyright (C) 2016 |
| 8 | +
|
| 9 | +Author: Guido Cossu <guido.cossu@ed.ac.uk> |
| 10 | +
|
| 11 | +This program is free software; you can redistribute it and/or modify |
| 12 | +it under the terms of the GNU General Public License as published by |
| 13 | +the Free Software Foundation; either version 2 of the License, or |
| 14 | +(at your option) any later version. |
| 15 | +
|
| 16 | +This program is distributed in the hope that it will be useful, |
| 17 | +but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 18 | +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 19 | +GNU General Public License for more details. |
| 20 | +
|
| 21 | +You should have received a copy of the GNU General Public License along |
| 22 | +with this program; if not, write to the Free Software Foundation, Inc., |
| 23 | +51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. |
| 24 | +
|
| 25 | +See the full license in the file "LICENSE" in the top level distribution |
| 26 | +directory |
| 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 | +#pragma warning disable 488 |
| 41 | + |
| 42 | +#ifdef __NVCC__ |
| 43 | + //disables nvcc specific warning in json.hpp |
| 44 | +#pragma clang diagnostic ignored "-Wdeprecated-register" |
| 45 | +#pragma diag_suppress unsigned_compare_with_zero |
| 46 | +#pragma diag_suppress cast_to_qualified_type |
| 47 | + |
| 48 | + //disables nvcc specific warning in many files |
| 49 | +#pragma diag_suppress esa_on_defaulted_function_ignored |
| 50 | +#pragma diag_suppress extra_semicolon |
| 51 | + |
| 52 | +//Eigen only |
| 53 | +#endif |
| 54 | + |
| 55 | +// Disable vectorisation in Eigen on the Power8/9 and PowerPC |
| 56 | +#ifdef __ALTIVEC__ |
| 57 | +#define EIGEN_DONT_VECTORIZE |
| 58 | +#endif |
| 59 | +#ifdef __VSX__ |
| 60 | +#define EIGEN_DONT_VECTORIZE |
| 61 | +#endif |
| 62 | + |
| 63 | +#endif |
0 commit comments