pub struct SimdOps {
pub find_delimiters: unsafe fn(&[u8]) -> DelimiterResult,
pub classify_bytes: unsafe fn(&[u8]) -> Vec<u8>,
pub skip_whitespace: unsafe fn(&[u8]) -> usize,
pub compute_byte_mask: unsafe fn(&[u8], u8) -> u64,
pub compute_all_masks: unsafe fn(&[u8]) -> AllMasks,
pub level: SimdLevel,
}Expand description
Function-pointer table for the three core SIMD operations.
Each slot holds an unsafe fn because the SIMD variants require
#[target_feature] and therefore cannot be called without unsafe.
The scalar implementations are inherently safe but share the same
signature for uniformity.
Fields§
§find_delimiters: unsafe fn(&[u8]) -> DelimiterResultScan for the first HTML delimiter (<, >, &, ", ', =, /).
classify_bytes: unsafe fn(&[u8]) -> Vec<u8>Classify every byte into a category bitmask (see crate::class).
skip_whitespace: unsafe fn(&[u8]) -> usizeReturn the offset of the first non-whitespace byte.
compute_byte_mask: unsafe fn(&[u8], u8) -> u64Produce a u64 bitmask where bit i is set if block[i] == byte.
The block must be at most 64 bytes.
compute_all_masks: unsafe fn(&[u8]) -> AllMasksCompute all seven delimiter bitmasks in a single pass. Loads each 16-byte chunk once, producing all masks simultaneously.
level: SimdLevelThe SIMD level backing these function pointers.
Auto Trait Implementations§
impl Freeze for SimdOps
impl RefUnwindSafe for SimdOps
impl Send for SimdOps
impl Sync for SimdOps
impl Unpin for SimdOps
impl UnsafeUnpin for SimdOps
impl UnwindSafe for SimdOps
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more