Expand description
SIMD utilities and trait extensions for the wide crate
This module provides optimized platform-specific implementations for common SIMD operations
that are not directly available in the wide crate, including:
- Widening operations (u32x8 → u64x8)
- Bitmask to vector conversion
- Shuffle/permute operations
- Vector splitting (high/low extraction)
- Cross-platform optimizations for x86_64 and aarch64
§Examples
use simd_lookup::wide_utils::{WideUtilsExt, FromBitmask};
use wide::{u32x8, u64x8};
let input = u32x8::from([1, 2, 3, 4, 5, 6, 7, 8]);
let widened: u64x8 = input.widen_to_u64x8();
let mask = 0b10101010u8;
let mask_vec: u64x8 = u64x8::from_bitmask(mask);Statics§
- SHUFFLE_
COMPRESS_ IDX_ U8_ HI - High byte shuffle indices (with +8 offset baked in)
- SHUFFLE_
COMPRESS_ IDX_ U8_ LO - Shuffle indices for compressing u8x16 (low half).
- SHUFFLE_
COMPRESS_ IDX_ U32 - Legacy alias for backwards compatibility
- SHUFFLE_
COMPRESS_ IDX_ U32X8 - Shuffle indices for compressing u32x8 based on an 8-bit mask.
Each entry contains the indices to shuffle selected elements to the front.
Stored as arrays; use
get_compress_indices_u32x8()for zero-cost SIMD access.
Traits§
- From
Bitmask - Trait for creating SIMD vectors from bitmasks
- Simd
Split - Trait for splitting SIMD vectors into high/low halves efficiently
- Wide
Utils Ext - Trait extension for
wideSIMD types providing additional utility operations
Functions§
- get_
compress_ indices_ u32x8 - Get compress indices as u32x8 (zero-cost transmute from array)