Expand description
Elementwise lane kernels over indexed sources.
Replaces &[T] with an IndexedSource trait: each lane read is
unsafe fn get_unchecked(i) -> Item, independent across iterations. For &[T]
this inlines to the same indexed load as the slice kernel; for LaneZip(&[A], &[B])
it gives two independent indexed reads per lane — both shapes the auto-vectorizer
handles.
The module is split into:
source— theIndexedSourcetrait,LaneZip, and read-only adapters.sink— theIndexedSinktrait andReinterpretSink.map_into— out-of-place kernels viaIndexedSourceExt(writes into a caller-provided&mut [MaybeUninit<R>]).map_in_place— in-place kernels viaIndexedSinkExt(writes back through the sink itself).
The kernels never allocate. Both kernel families handle a mask with a non-byte-aligned
offset and with a logical len shorter than the underlying byte buffer, via
BitBuffer::chunks.
Re-exports§
pub use map_in_place::IndexedSinkExt;pub use map_into::IndexedSourceExt;pub use sink::IndexedSink;pub use sink::ReinterpretSink;pub use source::IndexedSource;pub use source::LaneZip;
Modules§
- map_
in_ place - In-place lane kernels: read from an
IndexedSinkand write back through the same sink (no separate output buffer). - map_
into - Out-of-place lane kernels: read from an
IndexedSourceand write into a caller-provided&mut [MaybeUninit<R>]. - sink
- Writable lane sink — the
IndexedSinktrait and theReinterpretSinkadapter for in-place type-punning kernels. - source
- Read-only lane source — the
IndexedSourcetrait and theLaneZipadapter.