Skip to main content

axpy

Function axpy 

Source
pub fn axpy(c: u8, x: &[u8], y: &mut [u8])
Expand description

y[i] ^= c * x[i] in GF(2⁸) — the fundamental RLNC primitive.

On std targets the best SIMD kernel is selected at first call and cached for all subsequent calls. On no_std targets the kernel is selected at compile time from the available target_feature flags.

§Panics

  • Panics if x.len() != y.len().
  • Panics if x and y memory ranges overlap (including full alias). Use a temporary buffer for in-place-style work; c == 1 still requires disjoint ranges.

§Aliasing

Buffers must be completely disjoint. Overlap is checked in release builds (pointer compare only).