Skip to main content

should_use_simd

Function should_use_simd 

Source
pub fn should_use_simd(size: usize, dtype_size: usize) -> bool
Expand description

Helper function to determine if SIMD should be used based on array size

§Arguments

  • size - Size of the array
  • dtype_size - Size of the data type in bytes (4 for f32, 8 for f64)

§Returns

True if SIMD should be used, false otherwise