Skip to main content

prefetch_vector

Function prefetch_vector 

Source
pub fn prefetch_vector(vector: &[f32])
Expand description

Prefetches a vector into L1 cache (T0 hint) for upcoming SIMD operations.

§Platform Support

  • x86_64: Uses _mm_prefetch with _MM_HINT_T0
  • aarch64: Uses inline ASM workaround (rust-lang/rust#117217)
  • Other: No-op (graceful degradation)

§Safety

This function is safe because prefetch instructions are hints and cannot cause memory faults even with invalid addresses.