chombo-discharge
Loading...
Searching...
No Matches
CD_Decorations.H
Go to the documentation of this file.
1/*
2 * SPDX-FileCopyrightText: 2021-2026 SINTEF Energy Research
3 *
4 * SPDX-License-Identifier: GPL-3.0-or-later
5 */
6
13#ifndef CD_DECORATIONS_H
14#define CD_DECORATIONS_H
15
16#include <CD_NamespaceHeader.H>
17
19// SIMD instructions
20#ifndef NDEBUG
21#define CD_PRAGMA_SIMD
22
23#elif defined(__INTEL_COMPILER)
24#define CD_PRAGMA_SIMD _Pragma("ivdep")
25
26#elif defined(__INTEL_LLVM_COMPILER)
27#define CD_PRAGMA_SIMD _Pragma("SIMD")
28
29#elif defined(__clang__)
30#define CD_PRAGMA_SIMD _Pragma("clang loop vectorize(enable)")
31
32#elif defined(__GNUC__)
33#define CD_PRAGMA_SIMD _Pragma("GCC ivdep")
34
35#else
36#define CD_PRAGMA_SIMD
37
38#endif
39
40// Force inline.
41#if defined(__GNUC__)
42#define ALWAYS_INLINE __attribute__((always_inline)) __inline__
43#else
44#define ALWAYS_INLINE inline
45#endif
47
48#include <CD_NamespaceFooter.H>
49#endif