Welcome to mirror list, hosted at ThFree Co, Russian Federation.

simd_common.h « DSUtil « src - github.com/mpc-hc/mpc-hc.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 0b5e307e69e858d8ef3ca1927a094cfa64ba5333 (plain)
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
#ifndef _SIMD_COMMON_H_
#define _SIMD_COMMON_H_

#ifdef __GNUC__
 #define __forceinline __attribute__((__always_inline__)) inline
#else
 #define inline __forceinline
#endif

#ifdef __GNUC__
 #define __inline __forceinline  // GCC needs to force inlining of intrinsics functions
#endif

#include <mmintrin.h>
#include <xmmintrin.h>
#include <emmintrin.h>

#ifdef __GNUC__
 #undef __inline
#endif

#ifdef __GNUC__
  #define __align8(t,v) t v __attribute__ ((aligned (8)))
  #define __align16(t,v) t v __attribute__ ((aligned (16)))
#else
  #define __align8(t,v) __declspec(align(8)) t v
  #define __align16(t,v) __declspec(align(16)) t v
#endif

#endif