VecCore 0.8.1
C++ Library for Portable SIMD Vectorization
Loading...
Searching...
No Matches
Common.h
Go to the documentation of this file.
1#ifndef VECCORE_COMMON_H
2#define VECCORE_COMMON_H
3
4#if defined(__x86_64__) || defined(_M_X64)
5#define VECCORE_X64
6#elif defined(__i386__) || defined(_M_IX86)
7#define VECCORE_X86
8#elif defined(__aarch64__) || defined(_M_ARM64)
9#define VECCORE_ARM64
10#elif defined(__arm__) || defined(_M_ARM)
11#define VECCORE_ARM
12#elif defined(__PPC64__)
13#define VECCORE_PPC64
14#endif
15
16#include "CUDA.h"
17
18#ifndef VECCORE_CUDA
19# include "SIMD.h"
20#endif
21
22#ifdef _MSC_VER
23#define __restrict__ __restrict
24#endif
25
26#ifndef VECCORE_NO_FORCED_INLINING
27#ifdef _MSC_VER
28#define VECCORE_FORCE_NOINLINE __declspec(noinline)
29#define VECCORE_FORCE_INLINE inline __forceinline
30#else
31#define VECCORE_FORCE_NOINLINE __attribute__((noinline))
32#define VECCORE_FORCE_INLINE inline __attribute__((always_inline))
33#endif
34#else
35#define VECCORE_FORCE_NOINLINE
36#define VECCORE_FORCE_INLINE
37#endif
38
39#endif