chombo-discharge
Loading...
Searching...
No Matches
CD_Decorations.H
1/* chombo-discharge
2 * Copyright © 2021 SINTEF Energy Research.
3 * Please refer to Copyright.txt and LICENSE in the chombo-discharge root directory.
4 */
5
12#ifndef CD_Decoration_H_
13#define CD_Decoration_H_
14
15#include <CD_NamespaceHeader.H>
16
17// SIMD instructions
18#ifndef NDEBUG
19#define CD_PRAGMA_SIMD
20
21#elif defined(__INTEL_COMPILER)
22#define CD_PRAGMA_SIMD _Pragma("ivdep")
23
24#elif defined(__INTEL_LLVM_COMPILER)
25#define CD_PRAGMA_SIMD _Pragma("SIMD")
26
27#elif defined(__clang__)
28#define CD_PRAGMA_SIMD _Pragma("clang loop vectorize(enable)")
29
30#elif defined(__GNUC__)
31#define CD_PRAGMA_SIMD _Pragma("GCC ivdep")
32
33#else
34#define CD_PRAGMA_SIMD
35
36#endif
37
38// Force inline.
39#if defined(__GNUC__)
40#define ALWAYS_INLINE __attribute__((always_inline)) __inline__
41#else
42#define ALWAYS_INLINE inline
43#endif
44
45#include <CD_NamespaceFooter.H>
46#endif