DPDK 25.03.0-rc0
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
31typedef uint8_t rte_v64u8_t __attribute__((vector_size(8), aligned(8)));
32
38typedef uint16_t rte_v64u16_t __attribute__((vector_size(8), aligned(8)));
39
45typedef uint32_t rte_v64u32_t __attribute__((vector_size(8), aligned(8)));
46
53typedef uint8_t rte_v128u8_t __attribute__((vector_size(16), aligned(16)));
54
60typedef uint16_t rte_v128u16_t __attribute__((vector_size(16), aligned(16)));
61
67typedef uint32_t rte_v128u32_t __attribute__((vector_size(16), aligned(16)));
68
74typedef uint64_t rte_v128u64_t __attribute__((vector_size(16), aligned(16)));
75
84typedef uint8_t rte_v256u8_t __attribute__((vector_size(32), aligned(32)));
85
92typedef uint16_t rte_v256u16_t __attribute__((vector_size(32), aligned(32)));
93
99typedef uint32_t rte_v256u32_t __attribute__((vector_size(32), aligned(32)));
100
106typedef uint64_t rte_v256u64_t __attribute__((vector_size(32), aligned(32)));
107
108
109/* Signed vector types */
110
116typedef int8_t rte_v64s8_t __attribute__((vector_size(8), aligned(8)));
117
123typedef int16_t rte_v64s16_t __attribute__((vector_size(8), aligned(8)));
124
130typedef int32_t rte_v64s32_t __attribute__((vector_size(8), aligned(8)));
131
138typedef int8_t rte_v128s8_t __attribute__((vector_size(16), aligned(16)));
139
145typedef int16_t rte_v128s16_t __attribute__((vector_size(16), aligned(16)));
146
152typedef int32_t rte_v128s32_t __attribute__((vector_size(16), aligned(16)));
153
159typedef int64_t rte_v128s64_t __attribute__((vector_size(16), aligned(16)));
160
169typedef int8_t rte_v256s8_t __attribute__((vector_size(32), aligned(32)));
170
177typedef int16_t rte_v256s16_t __attribute__((vector_size(32), aligned(32)));
178
184typedef int32_t rte_v256s32_t __attribute__((vector_size(32), aligned(32)));
185
191typedef int64_t rte_v256s64_t __attribute__((vector_size(32), aligned(32)));
192
193#endif
194
201 RTE_VECT_SIMD_128 = 128,
205 RTE_VECT_SIMD_MAX = INT16_MAX + 1,
210};
211
212#ifdef __cplusplus
213extern "C" {
214#endif
215
223
235int rte_vect_set_max_simd_bitwidth(uint16_t bitwidth);
236
237#ifdef __cplusplus
238}
239#endif
240
241#endif /* _RTE_VECT_H_ */
uint32_t rte_v64u32_t
Definition: rte_vect.h:45
uint32_t rte_v256u32_t
Definition: rte_vect.h:99
uint8_t rte_v256u8_t
Definition: rte_vect.h:84
uint16_t rte_v256u16_t
Definition: rte_vect.h:92
int8_t rte_v256s8_t
Definition: rte_vect.h:169
int16_t rte_v256s16_t
Definition: rte_vect.h:177
int8_t rte_v128s8_t
Definition: rte_vect.h:138
int rte_vect_set_max_simd_bitwidth(uint16_t bitwidth)
int16_t rte_v128s16_t
Definition: rte_vect.h:145
int32_t rte_v64s32_t
Definition: rte_vect.h:130
int32_t rte_v128s32_t
Definition: rte_vect.h:152
uint16_t rte_vect_get_max_simd_bitwidth(void)
int64_t rte_v128s64_t
Definition: rte_vect.h:159
int64_t rte_v256s64_t
Definition: rte_vect.h:191
uint16_t rte_v64u16_t
Definition: rte_vect.h:38
uint64_t rte_v256u64_t
Definition: rte_vect.h:106
uint64_t rte_v128u64_t
Definition: rte_vect.h:74
uint16_t rte_v128u16_t
Definition: rte_vect.h:60
rte_vect_max_simd
Definition: rte_vect.h:198
@ RTE_VECT_SIMD_MAX
Definition: rte_vect.h:205
@ RTE_VECT_SIMD_512
Definition: rte_vect.h:204
@ RTE_VECT_SIMD_256
Definition: rte_vect.h:203
@ RTE_VECT_SIMD_DISABLED
Definition: rte_vect.h:199
@ RTE_VECT_SIMD_128
Definition: rte_vect.h:201
uint32_t rte_v128u32_t
Definition: rte_vect.h:67
int8_t rte_v64s8_t
Definition: rte_vect.h:116
uint8_t rte_v64u8_t
Definition: rte_vect.h:31
int32_t rte_v256s32_t
Definition: rte_vect.h:184
uint8_t rte_v128u8_t
Definition: rte_vect.h:53
int16_t rte_v64s16_t
Definition: rte_vect.h:123