Vector Optimized Library of Kernels
2.3
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
8 #define __VOLK_ATTR_ALIGNED(x) __declspec(align(x))
9 #define __VOLK_ATTR_UNUSED
10 #define __VOLK_ATTR_INLINE __forceinline
11 #define __VOLK_ATTR_DEPRECATED __declspec(deprecated)
12 #define __VOLK_ATTR_EXPORT __declspec(dllexport)
13 #define __VOLK_ATTR_IMPORT __declspec(dllimport)
14 #define __VOLK_PREFETCH(addr)
15 #define __VOLK_ASM __asm
16 #define __VOLK_VOLATILE
17 #elif defined(__clang__)
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__
27 #define __VOLK_ATTR_EXPORT __attribute__((visibility("default")))
28 #define __VOLK_ATTR_IMPORT __attribute__((visibility("default")))
29 #define __VOLK_PREFETCH(addr) __builtin_prefetch(addr)
30 #elif defined __GNUC__
31 #define __VOLK_ATTR_ALIGNED(x) __attribute__((aligned(x)))
32 #define __VOLK_ATTR_UNUSED __attribute__((unused))
33 #define __VOLK_ATTR_INLINE __attribute__((always_inline))
34 #define __VOLK_ATTR_DEPRECATED __attribute__((deprecated))
35 #define __VOLK_ASM __asm__
36 #define __VOLK_VOLATILE __volatile__
38 #define __VOLK_ATTR_EXPORT __attribute__((visibility("default")))
39 #define __VOLK_ATTR_IMPORT __attribute__((visibility("default")))
41 #define __VOLK_ATTR_EXPORT
42 #define __VOLK_ATTR_IMPORT
44 #define __VOLK_PREFETCH(addr) __builtin_prefetch(addr)
46 #define __VOLK_ATTR_ALIGNED(x) __declspec(align(x))
47 #define __VOLK_ATTR_UNUSED
48 #define __VOLK_ATTR_INLINE __forceinline
49 #define __VOLK_ATTR_DEPRECATED __declspec(deprecated)
50 #define __VOLK_ATTR_EXPORT __declspec(dllexport)
51 #define __VOLK_ATTR_IMPORT __declspec(dllimport)
52 #define __VOLK_PREFETCH(addr)
53 #define __VOLK_ASM __asm
54 #define __VOLK_VOLATILE
56 #define __VOLK_ATTR_ALIGNED(x)
57 #define __VOLK_ATTR_UNUSED
58 #define __VOLK_ATTR_INLINE
59 #define __VOLK_ATTR_DEPRECATED
60 #define __VOLK_ATTR_EXPORT
61 #define __VOLK_ATTR_IMPORT
62 #define __VOLK_PREFETCH(addr)
63 #define __VOLK_ASM __asm__
64 #define __VOLK_VOLATILE __volatile__
71 #pragma warning(disable : 4244) //'conversion' conversion from 'type1' to 'type2',
73 #pragma warning(disable : 4305) //'identifier' : truncation from 'type1' to 'type2'
80 #if defined(__cplusplus) && (__GNUC__)
81 #define __VOLK_DECL_BEGIN extern "C" {
82 #define __VOLK_DECL_END }
84 #define __VOLK_DECL_BEGIN
85 #define __VOLK_DECL_END
93 #define VOLK_API __VOLK_ATTR_EXPORT
95 #define VOLK_API __VOLK_ATTR_IMPORT
107 #include <x86intrin.h>
142 #define bit128_p(x) ((union bit128*)(x))
143 #define bit256_p(x) ((union bit256*)(x))
152 float const result = log2f(f);
153 return isinf(result) ? copysignf(127.0f, result) : result;
160 #define volk_log2to10factor 3.01029995663981209120
__m256i int_vec
Definition: volk_common.h:137
uint16_t i16[16]
Definition: volk_common.h:130
static float log2f_non_ieee(float f)
Definition: volk_common.h:150
uint8_t i8[16]
Definition: volk_common.h:112
Definition: volk_common.h:128
float f[8]
Definition: volk_common.h:132
uint32_t i[8]
Definition: volk_common.h:131
__m128i int_vec
Definition: volk_common.h:123
uint8_t i8[32]
Definition: volk_common.h:129
__m128d double_vec
Definition: volk_common.h:124
double d[2]
Definition: volk_common.h:116
uint16_t i16[8]
Definition: volk_common.h:113
uint32_t i[4]
Definition: volk_common.h:114
float f[4]
Definition: volk_common.h:115
__m256 float_vec
Definition: volk_common.h:136
double d[4]
Definition: volk_common.h:133
Definition: volk_common.h:111
__m256d double_vec
Definition: volk_common.h:138
__m128 float_vec
Definition: volk_common.h:119