10 #ifndef INCLUDED_LIBVOLK_COMMON_H
11 #define INCLUDED_LIBVOLK_COMMON_H
17 #define __VOLK_ATTR_ALIGNED(x) __declspec(align(x))
18 #define __VOLK_ATTR_UNUSED
19 #define __VOLK_ATTR_INLINE __forceinline
20 #define __VOLK_ATTR_DEPRECATED __declspec(deprecated)
21 #define __VOLK_ATTR_EXPORT __declspec(dllexport)
22 #define __VOLK_ATTR_IMPORT __declspec(dllimport)
23 #define __VOLK_PREFETCH(addr)
24 #define __VOLK_ASM __asm
25 #define __VOLK_VOLATILE
26 #elif defined(__clang__)
30 #define __VOLK_ATTR_ALIGNED(x) __attribute__((aligned(x)))
31 #define __VOLK_ATTR_UNUSED __attribute__((unused))
32 #define __VOLK_ATTR_INLINE __attribute__((always_inline))
33 #define __VOLK_ATTR_DEPRECATED __attribute__((deprecated))
34 #define __VOLK_ASM __asm__
35 #define __VOLK_VOLATILE __volatile__
36 #define __VOLK_ATTR_EXPORT __attribute__((visibility("default")))
37 #define __VOLK_ATTR_IMPORT __attribute__((visibility("default")))
38 #define __VOLK_PREFETCH(addr) __builtin_prefetch(addr)
39 #elif defined __GNUC__
40 #define __VOLK_ATTR_ALIGNED(x) __attribute__((aligned(x)))
41 #define __VOLK_ATTR_UNUSED __attribute__((unused))
42 #define __VOLK_ATTR_INLINE __attribute__((always_inline))
43 #define __VOLK_ATTR_DEPRECATED __attribute__((deprecated))
44 #define __VOLK_ASM __asm__
45 #define __VOLK_VOLATILE __volatile__
47 #define __VOLK_ATTR_EXPORT __attribute__((visibility("default")))
48 #define __VOLK_ATTR_IMPORT __attribute__((visibility("default")))
50 #define __VOLK_ATTR_EXPORT
51 #define __VOLK_ATTR_IMPORT
53 #define __VOLK_PREFETCH(addr) __builtin_prefetch(addr)
55 #define __VOLK_ATTR_ALIGNED(x) __declspec(align(x))
56 #define __VOLK_ATTR_UNUSED
57 #define __VOLK_ATTR_INLINE __forceinline
58 #define __VOLK_ATTR_DEPRECATED __declspec(deprecated)
59 #define __VOLK_ATTR_EXPORT __declspec(dllexport)
60 #define __VOLK_ATTR_IMPORT __declspec(dllimport)
61 #define __VOLK_PREFETCH(addr)
62 #define __VOLK_ASM __asm
63 #define __VOLK_VOLATILE
65 #define __VOLK_ATTR_ALIGNED(x)
66 #define __VOLK_ATTR_UNUSED
67 #define __VOLK_ATTR_INLINE
68 #define __VOLK_ATTR_DEPRECATED
69 #define __VOLK_ATTR_EXPORT
70 #define __VOLK_ATTR_IMPORT
71 #define __VOLK_PREFETCH(addr)
72 #define __VOLK_ASM __asm__
73 #define __VOLK_VOLATILE __volatile__
80 #pragma warning(disable : 4244)
82 #pragma warning(disable : 4305)
89 #if defined(__cplusplus) && (__GNUC__)
90 #define __VOLK_DECL_BEGIN extern "C" {
91 #define __VOLK_DECL_END }
93 #define __VOLK_DECL_BEGIN
94 #define __VOLK_DECL_END
102 #define VOLK_API __VOLK_ATTR_EXPORT
104 #define VOLK_API __VOLK_ATTR_IMPORT
116 #include <x86intrin.h>
151 #define bit128_p(x) ((union bit128*)(x))
152 #define bit256_p(x) ((union bit256*)(x))
161 float const result = log2f(f);
162 return isinf(result) ? copysignf(127.0f, result) : result;
169 #define volk_log2to10factor 3.01029995663981209120
float32x4_t __m128
Definition: sse2neon.h:235
float32x4_t __m128d
Definition: sse2neon.h:242
int64x2_t __m128i
Definition: sse2neon.h:244
Definition: volk_common.h:120
float f[4]
Definition: volk_common.h:124
__m128i int_vec
Definition: volk_common.h:132
__m128d double_vec
Definition: volk_common.h:133
uint8_t i8[16]
Definition: volk_common.h:121
uint32_t i[4]
Definition: volk_common.h:123
double d[2]
Definition: volk_common.h:125
uint16_t i16[8]
Definition: volk_common.h:122
__m128 float_vec
Definition: volk_common.h:128
Definition: volk_common.h:137
float f[8]
Definition: volk_common.h:141
__m256d double_vec
Definition: volk_common.h:147
uint8_t i8[32]
Definition: volk_common.h:138
uint16_t i16[16]
Definition: volk_common.h:139
double d[4]
Definition: volk_common.h:142
uint32_t i[8]
Definition: volk_common.h:140
__m256 float_vec
Definition: volk_common.h:145
__m256i int_vec
Definition: volk_common.h:146
static float log2f_non_ieee(float f)
Definition: volk_common.h:159