rte_vect.h(3)
π rte_vect.h π
okay bestie, so this is the manual page for rte_vect.h from the Library Functions Manual β yes, the actual one, section 3, we're in the big leagues now. It's the DPDK header that gives you SIMD vector types so you can write generic C and let the compiler go absolutely feral with vector instructions. Sit down, hydrate, we're doing this. π«Ά
β¨ NAME β¨
rte_vect.h β no cap, that's the name. Moving on, gorgeous.
πΈ SYNOPSIS πΈ
#include <stdint.h>
π§ Typedefs
typedef uint8_t rte_v64u8_ttypedef uint16_t rte_v64u16_ttypedef uint32_t rte_v64u32_ttypedef uint8_t rte_v128u8_ttypedef uint16_t rte_v128u16_ttypedef uint32_t rte_v128u32_ttypedef uint64_t rte_v128u64_ttypedef uint8_t rte_v256u8_ttypedef uint16_t rte_v256u16_ttypedef uint32_t rte_v256u32_ttypedef uint64_t rte_v256u64_ttypedef int8_t rte_v64s8_ttypedef int16_t rte_v64s16_ttypedef int32_t rte_v64s32_ttypedef int8_t rte_v128s8_ttypedef int16_t rte_v128s16_ttypedef int32_t rte_v128s32_ttypedef int64_t rte_v128s64_ttypedef int8_t rte_v256s8_ttypedef int16_t rte_v256s16_ttypedef int32_t rte_v256s32_ttypedef int64_t rte_v256s64_t
π Enumerations
enum rte_vect_max_simd {
RTE_VECT_SIMD_DISABLED = 64,
RTE_VECT_SIMD_128 = 128,
RTE_VECT_SIMD_256 = 256,
RTE_VECT_SIMD_512 = 512,
RTE_VECT_SIMD_MAX = INT16_MAX + 1
}
π Functions
uint16_t rte_vect_get_max_simd_bitwidth (void)int rte_vect_set_max_simd_bitwidth (uint16_t bitwidth)
π¦ Detailed Description π¦
SIMD vector types and control. π
This file defines types you can use to do vector instructions with generic C code, plus the APIs that switch that code on. Definition in file rte_vect.h.
π Typedef Documentation π
typedef uint8_t rte_v64u8_t
64 bits vector size to use with unsigned 8 bits elements. it's giving baby vector, eight tiny unsigned cells:
a = (rte_v64u8_t){ a0, a1, a2, a3, a4, a5, a6, a7 }
Definition at line 31 of file rte_vect.h.
typedef uint16_t rte_v64u16_t
64 bits vector size to use with unsigned 16 bits elements. four of them, cozy:
a = (rte_v64u16_t){ a0, a1, a2, a3 }
Definition at line 38 of file rte_vect.h.
typedef uint32_t rte_v64u32_t
64 bits vector size to use with unsigned 32 bits elements. literally just a duo:
a = (rte_v64u32_t){ a0, a1 }
Definition at line 45 of file rte_vect.h.
typedef uint8_t rte_v128u8_t
128 bits vector size to use with unsigned 8 bits elements. sixteen lil guys, a whole friend group:
a = (rte_v128u8_t){ a00, a01, a02, a03, a04, a05, a06, a07, a08, a09,
a10, a11, a12, a13, a14, a15 }
Definition at line 53 of file rte_vect.h.
typedef uint16_t rte_v128u16_t
128 bits vector size to use with unsigned 16 bits elements. eight slots, immaculate:
a = (rte_v128u16_t){ a0, a1, a2, a3, a4, a5, a6, a7 }
Definition at line 60 of file rte_vect.h.
typedef uint32_t rte_v128u32_t
128 bits vector size to use with unsigned 32 bits elements. a four-piece, iconic:
a = (rte_v128u32_t){ a0, a1, a2, a3 }
Definition at line 67 of file rte_vect.h.
typedef uint64_t rte_v128u64_t
128 bits vector size to use with unsigned 64 bits elements. the power couple:
a = (rte_v128u64_t){ a0, a1 }
Definition at line 74 of file rte_vect.h.
typedef uint8_t rte_v256u8_t
256 bits vector size to use with unsigned 8 bits elements. thirty-two of them bestie, we're SO back:
a = (rte_v256u8_t){ a00, a01, a02, a03, a04, a05, a06, a07, a08, a09,
a10, a11, a12, a13, a14, a15, a16, a17, a18, a19, a20, a21, a22, a23,
a24, a25, a26, a27, a28, a29, a30, a31 }
Definition at line 84 of file rte_vect.h.
typedef uint16_t rte_v256u16_t
256 bits vector size to use with unsigned 16 bits elements. sixteen wide, main character energy:
a = (rte_v256u16_t){ a00, a01, a02, a03, a04, a05, a06, a07, a08, a09,
a10, a11, a12, a13, a14, a15 }
Definition at line 92 of file rte_vect.h.
typedef uint32_t rte_v256u32_t
256 bits vector size to use with unsigned 32 bits elements. eight of them, slay:
a = (rte_v256u32_t){ a0, a1, a2, a3, a4, a5, a6, a7 }
Definition at line 99 of file rte_vect.h.
typedef uint64_t rte_v256u64_t
256 bits vector size to use with unsigned 64 bits elements. four chonky ones:
a = (rte_v256u64_t){ a0, a1, a2, a3 }
Definition at line 106 of file rte_vect.h.
typedef int8_t rte_v64s8_t
64 bits vector size to use with 8 bits elements. signed now, but still cute:
a = (rte_v64s8_t){ a0, a1, a2, a3, a4, a5, a6, a7 }
Definition at line 116 of file rte_vect.h.
typedef int16_t rte_v64s16_t
64 bits vector size to use with 16 bits elements. signed, four cells:
a = (rte_v64s16_t){ a0, a1, a2, a3 }
Definition at line 123 of file rte_vect.h.
typedef int32_t rte_v64s32_t
64 bits vector size to use with 32 bits elements. signed duo, periodt:
a = (rte_v64s32_t){ a0, a1 }
Definition at line 130 of file rte_vect.h.
typedef int8_t rte_v128s8_t
128 bits vector size to use with 8 bits elements. signed sixteen, bless:
a = (rte_v128s8_t){ a00, a01, a02, a03, a04, a05, a06, a07, a08, a09,
a10, a11, a12, a13, a14, a15 }
Definition at line 138 of file rte_vect.h.
typedef int16_t rte_v128s16_t
128 bits vector size to use with 16 bits elements. signed eight, no notes:
a = (rte_v128s16_t){ a0, a1, a2, a3, a4, a5, a6, a7 }
Definition at line 145 of file rte_vect.h.
typedef int32_t rte_v128s32_t
128 bits vector size to use with 32 bits elements. signed four, obsessed:
a = (rte_v128s32_t){ a0, a1, a2, a3 }
Definition at line 152 of file rte_vect.h.
typedef int64_t rte_v128s64_t
128 bits vector size to use with 64 bits elements. and yes, the example really does start at a1:
a = (rte_v128s64_t){ a1, a2 }
Definition at line 159 of file rte_vect.h.
typedef int8_t rte_v256s8_t
256 bits vector size to use with 8 bits elements. signed thirty-two, absolutely unhinged (affectionate):
a = (rte_v256s8_t){ a00, a01, a02, a03, a04, a05, a06, a07, a08, a09,
a10, a11, a12, a13, a14, a15, a16, a17, a18, a19, a20, a21, a22, a23,
a24, a25, a26, a27, a28, a29, a30, a31 }
Definition at line 169 of file rte_vect.h.
typedef int16_t rte_v256s16_t
256 bits vector size to use with 16 bits elements. signed sixteen, in formation:
a = (rte_v256s16_t){ a00, a01, a02, a03, a04, a05, a06, a07, a08, a09,
a10, a11, a12, a13, a14, a15 }
Definition at line 177 of file rte_vect.h.
typedef int32_t rte_v256s32_t
256 bits vector size to use with 32 bits elements. signed eight, chef's kiss:
a = (rte_v256s32_t){ a0, a1, a2, a3, a4, a5, a6, a7 }
Definition at line 184 of file rte_vect.h.
typedef int64_t rte_v256s64_t
256 bits vector size to use with 64 bits elements. signed quad, final boss:
a = (rte_v256s64_t){ a0, a1, a2, a3 }
Definition at line 191 of file rte_vect.h.
π Enumeration Type Documentation π
enum rte_vect_max_simd
The max SIMD bitwidth value to limit vector path selection. this is the vibe check for how wide your code is allowed to go π
Enumerator
RTE_VECT_SIMD_DISABLEDβ Limits path selection to scalar, disables all vector paths. yes, all of them. scalar only, sad girl hours. πRTE_VECT_SIMD_128β Limits path selection to SSE/NEON/Altivec or below.RTE_VECT_SIMD_256β Limits path selection to AVX2 or below.RTE_VECT_SIMD_512β Limits path selection to AVX512 or below.RTE_VECT_SIMD_MAXβ Disables limiting by max SIMD bitwidth, allows all suitable paths. This value is used as it is a large number and a power of 2.
Definition at line 198 of file rte_vect.h.
β Function Documentation β
uint16_t rte_vect_get_max_simd_bitwidth (void )
Get the supported SIMD bitwidth.
Returns
uint16_t bitwidth.
int rte_vect_set_max_simd_bitwidth (uint16_t bitwidth)
Set the supported SIMD bitwidth.
π¨ bestie, listen: this API should only be called once at initialization, before EAL init. do not be out here calling it whenever, that's not the move.
Parameters
bitwidthβuint16_t bitwidth.
Returns
0on success.-EINVALon invalid bitwidth parameter.-EPERMif bitwidth is forced.
π Author π
Generated automatically by Doxygen for DPDK from the source code.
and that's the whole page, babe. this gorgeous little doc came to you courtesy of DPDK, Version 25.11.3 β generated automatically by Doxygen, so like, technically the robots wrote it and I just gave it the personality transplant it deserved. πβ¨π mwah, go write some vectors, you absolute icon. π
π¦ where this page comes from
- ubuntu resolute: dpdk-doc 25.11.3-0ubuntu0.26.04.1 Β· BSD-3-Clause
- ubuntu stonking: dpdk-doc 25.11.3-1 Β· BSD-3-Clause
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms