DPDK  24.07.0
rte_vect.h
Go to the documentation of this file.
1 /* SPDX-License-Identifier: BSD-3-Clause
2  * Copyright 2016 6WIND S.A.
3  */
4 
5 #ifndef _RTE_VECT_H_
6 #define _RTE_VECT_H_
7 
16 #include <stdint.h>
17 
18 #ifdef RTE_TOOLCHAIN_MSVC
19 
20 #include <intrin.h>
21 
22 #else
23 
24 /* Unsigned vector types */
25 
31 typedef uint8_t rte_v64u8_t __attribute__((vector_size(8), aligned(8)));
32 
38 typedef uint16_t rte_v64u16_t __attribute__((vector_size(8), aligned(8)));
39 
45 typedef uint32_t rte_v64u32_t __attribute__((vector_size(8), aligned(8)));
46 
53 typedef uint8_t rte_v128u8_t __attribute__((vector_size(16), aligned(16)));
54 
60 typedef uint16_t rte_v128u16_t __attribute__((vector_size(16), aligned(16)));
61 
67 typedef uint32_t rte_v128u32_t __attribute__((vector_size(16), aligned(16)));
68 
74 typedef uint64_t rte_v128u64_t __attribute__((vector_size(16), aligned(16)));
75 
84 typedef uint8_t rte_v256u8_t __attribute__((vector_size(32), aligned(32)));
85 
92 typedef uint16_t rte_v256u16_t __attribute__((vector_size(32), aligned(32)));
93 
99 typedef uint32_t rte_v256u32_t __attribute__((vector_size(32), aligned(32)));
100 
106 typedef uint64_t rte_v256u64_t __attribute__((vector_size(32), aligned(32)));
107 
108 
109 /* Signed vector types */
110 
116 typedef int8_t rte_v64s8_t __attribute__((vector_size(8), aligned(8)));
117 
123 typedef int16_t rte_v64s16_t __attribute__((vector_size(8), aligned(8)));
124 
130 typedef int32_t rte_v64s32_t __attribute__((vector_size(8), aligned(8)));
131 
138 typedef int8_t rte_v128s8_t __attribute__((vector_size(16), aligned(16)));
139 
145 typedef int16_t rte_v128s16_t __attribute__((vector_size(16), aligned(16)));
146 
152 typedef int32_t rte_v128s32_t __attribute__((vector_size(16), aligned(16)));
153 
159 typedef int64_t rte_v128s64_t __attribute__((vector_size(16), aligned(16)));
160 
169 typedef int8_t rte_v256s8_t __attribute__((vector_size(32), aligned(32)));
170 
177 typedef int16_t rte_v256s16_t __attribute__((vector_size(32), aligned(32)));
178 
184 typedef int32_t rte_v256s32_t __attribute__((vector_size(32), aligned(32)));
185 
191 typedef int64_t rte_v256s64_t __attribute__((vector_size(32), aligned(32)));
192 
193 #endif
194 
205  RTE_VECT_SIMD_MAX = INT16_MAX + 1,
210 };
211 
218 uint16_t rte_vect_get_max_simd_bitwidth(void);
219 
231 int rte_vect_set_max_simd_bitwidth(uint16_t bitwidth);
232 
233 #endif /* _RTE_VECT_H_ */
int64_t rte_v256s64_t
Definition: rte_vect.h:191
uint32_t rte_v64u32_t
Definition: rte_vect.h:45
uint8_t rte_v64u8_t
Definition: rte_vect.h:31
uint64_t rte_v256u64_t
Definition: rte_vect.h:106
int8_t rte_v64s8_t
Definition: rte_vect.h:116
uint32_t rte_v256u32_t
Definition: rte_vect.h:99
int32_t rte_v128s32_t
Definition: rte_vect.h:152
uint16_t rte_vect_get_max_simd_bitwidth(void)
uint8_t rte_v128u8_t
Definition: rte_vect.h:53
int16_t rte_v256s16_t
Definition: rte_vect.h:177
int64_t rte_v128s64_t
Definition: rte_vect.h:159
int16_t rte_v128s16_t
Definition: rte_vect.h:145
int32_t rte_v64s32_t
Definition: rte_vect.h:130
int rte_vect_set_max_simd_bitwidth(uint16_t bitwidth)
uint16_t rte_v64u16_t
Definition: rte_vect.h:38
uint8_t rte_v256u8_t
Definition: rte_vect.h:84
int32_t rte_v256s32_t
Definition: rte_vect.h:184
int8_t rte_v256s8_t
Definition: rte_vect.h:169
uint64_t rte_v128u64_t
Definition: rte_vect.h:74
int8_t rte_v128s8_t
Definition: rte_vect.h:138
rte_vect_max_simd
Definition: rte_vect.h:198
uint16_t rte_v256u16_t
Definition: rte_vect.h:92
int16_t rte_v64s16_t
Definition: rte_vect.h:123
uint32_t rte_v128u32_t
Definition: rte_vect.h:67
uint16_t rte_v128u16_t
Definition: rte_vect.h:60