Vector Optimized Library of Kernels
2.2
Architecture-tuned implementations of math kernels
|
|
Go to the documentation of this file. 1 #ifndef INCLUDED_LIBVOLK_COMMON_H
2 #define INCLUDED_LIBVOLK_COMMON_H
7 #if defined(__clang__) && (!defined(_MSC_VER))
11 # define __VOLK_ATTR_ALIGNED(x) __attribute__((aligned(x)))
12 # define __VOLK_ATTR_UNUSED __attribute__((unused))
13 # define __VOLK_ATTR_INLINE __attribute__((always_inline))
14 # define __VOLK_ATTR_DEPRECATED __attribute__((deprecated))
15 # define __VOLK_ASM __asm__
16 # define __VOLK_VOLATILE __volatile__
17 # define __VOLK_ATTR_EXPORT __attribute__((visibility("default")))
18 # define __VOLK_ATTR_IMPORT __attribute__((visibility("default")))
19 # define __VOLK_PREFETCH(addr) __builtin_prefetch(addr)
20 #elif defined __GNUC__
21 # define __VOLK_ATTR_ALIGNED(x) __attribute__((aligned(x)))
22 # define __VOLK_ATTR_UNUSED __attribute__((unused))
23 # define __VOLK_ATTR_INLINE __attribute__((always_inline))
24 # define __VOLK_ATTR_DEPRECATED __attribute__((deprecated))
25 # define __VOLK_ASM __asm__
26 # define __VOLK_VOLATILE __volatile__
28 # define __VOLK_ATTR_EXPORT __attribute__((visibility("default")))
29 # define __VOLK_ATTR_IMPORT __attribute__((visibility("default")))
31 # define __VOLK_ATTR_EXPORT
32 # define __VOLK_ATTR_IMPORT
34 # define __VOLK_PREFETCH(addr) __builtin_prefetch(addr)
36 # define __VOLK_ATTR_ALIGNED(x) __declspec(align(x))
37 # define __VOLK_ATTR_UNUSED
38 # define __VOLK_ATTR_INLINE __forceinline
39 # define __VOLK_ATTR_DEPRECATED __declspec(deprecated)
40 # define __VOLK_ATTR_EXPORT __declspec(dllexport)
41 # define __VOLK_ATTR_IMPORT __declspec(dllimport)
42 # define __VOLK_PREFETCH(addr)
43 # define __VOLK_ASM __asm
44 # define __VOLK_VOLATILE
46 # define __VOLK_ATTR_ALIGNED(x)
47 # define __VOLK_ATTR_UNUSED
48 # define __VOLK_ATTR_INLINE
49 # define __VOLK_ATTR_DEPRECATED
50 # define __VOLK_ATTR_EXPORT
51 # define __VOLK_ATTR_IMPORT
52 # define __VOLK_PREFETCH(addr)
53 # define __VOLK_ASM __asm__
54 # define __VOLK_VOLATILE __volatile__
61 # pragma warning(disable: 4244) //'conversion' conversion from 'type1' to 'type2', possible loss of data
62 # pragma warning(disable: 4305) //'identifier' : truncation from 'type1' to 'type2'
69 #if defined(__cplusplus) && (__GNUC__)
70 # define __VOLK_DECL_BEGIN extern "C" {
71 # define __VOLK_DECL_END }
73 # define __VOLK_DECL_BEGIN
74 # define __VOLK_DECL_END
82 # define VOLK_API __VOLK_ATTR_EXPORT
84 # define VOLK_API __VOLK_ATTR_IMPORT
96 #include <x86intrin.h>
131 #define bit128_p(x) ((union bit128 *)(x))
132 #define bit256_p(x) ((union bit256 *)(x))
__m256i int_vec
Definition: volk_common.h:126
uint16_t i16[16]
Definition: volk_common.h:119
uint8_t i8[16]
Definition: volk_common.h:101
Definition: volk_common.h:117
float f[8]
Definition: volk_common.h:121
uint32_t i[8]
Definition: volk_common.h:120
__m128i int_vec
Definition: volk_common.h:112
uint8_t i8[32]
Definition: volk_common.h:118
__m128d double_vec
Definition: volk_common.h:113
double d[2]
Definition: volk_common.h:105
uint16_t i16[8]
Definition: volk_common.h:102
uint32_t i[4]
Definition: volk_common.h:103
float f[4]
Definition: volk_common.h:104
__m256 float_vec
Definition: volk_common.h:125
double d[4]
Definition: volk_common.h:122
Definition: volk_common.h:100
__m256d double_vec
Definition: volk_common.h:127
__m128 float_vec
Definition: volk_common.h:108