Skip to main content

Module simd

Module simd 

Source
Expand description

Vectorized SIMD implementations for x86_64 (AVX2).

Functions§

decode_avx2⚠
Decodes 32 Base64 ASCII bytes to 24 raw bytes using AVX2. Returns (input_bytes_consumed, output_bytes_written). Breaks out if padding (‘=’) or invalid characters are encountered.
decode_avx512⚠
Decodes 64 Base64 ASCII bytes to 48 raw bytes using AVX-512BW. Returns (input_bytes_consumed, output_bytes_written).
decode_ssse3⚠
Decodes 16 Base64 ASCII bytes to 12 raw bytes using SSSE3 (128-bit SIMD).
encode_avx2⚠
Encodes 24 bytes to 32 Base64 ASCII bytes using AVX2. Returns (input_bytes_consumed, output_bytes_written).
encode_avx512⚠
Encodes 48 bytes to 64 Base64 ASCII bytes using AVX-512BW. Returns (input_bytes_consumed, output_bytes_written).
encode_ssse3⚠
Encodes 12 bytes to 16 Base64 ASCII bytes using SSSE3 (128-bit SIMD).
has_avx2
Checks if the host x86_64 CPU supports AVX2.
has_avx512
Checks if the host x86_64 CPU supports AVX-512 (specifically AVX-512F and AVX-512BW).
has_neon
Checks if the host CPU supports ARM NEON (always true on AArch64).
has_ssse3
Checks if the host x86_64 CPU supports SSSE3.
has_wasm_simd128
Checks if the host CPU supports WebAssembly 128-bit SIMD.