File: Common.h

package info (click to toggle)
veccore 0.8.0%2Bds1-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 13,968 kB
  • sloc: cpp: 2,894; ansic: 1,332; makefile: 2
file content (36 lines) | stat: -rw-r--r-- 829 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#ifndef VECCORE_COMMON_H
#define VECCORE_COMMON_H

#if defined(__x86_64__) || defined(_M_X64)
#define VECCORE_X64
#elif defined(__i386__) || defined(_M_IX86)
#define VECCORE_X86
#elif defined(__aarch64__) || defined(_M_ARM64)
#define VECCORE_ARM64
#elif defined(__arm__) || defined(_M_ARM)
#define VECCORE_ARM
#elif defined(__PPC64__)
#define VECCORE_PPC64
#endif

#include "CUDA.h"
#include "SIMD.h"

#ifdef _MSC_VER
#define __restrict__ __restrict
#endif

#ifndef VECCORE_NO_FORCED_INLINING
#ifdef _MSC_VER
#define VECCORE_FORCE_NOINLINE __declspec(noinline)
#define VECCORE_FORCE_INLINE inline __forceinline
#else
#define VECCORE_FORCE_NOINLINE __attribute__((noinline))
#define VECCORE_FORCE_INLINE inline __attribute__((always_inline))
#endif
#else
#define VECCORE_FORCE_NOINLINE
#define VECCORE_FORCE_INLINE
#endif

#endif