pub unsafe fn dynamic_update_into_uninit<'a, T, I>(
plan: &DynamicUpdateSlicePlan,
dest: &'a mut RawStridedMut<'a, MaybeUninit<T>>,
operand: &RawStridedRef<'_, T>,
update: &RawStridedRef<'_, T>,
starts: &RawStridedRef<'_, I>,
) -> Result<(), StridedError>Expand description
Full-overwrite indexed replay for an operation-family adapter.
§Safety
The adapter must reject input/output overlap before creating the input references. All descriptor allocation and initialization contracts must remain valid for the call. Output slots may be uninitialized; the owning plan retains its checked layout/index validation and private initialization receipt. No initialized reference to the output backing may be formed. Copy the operand and overwrite its selected window.
§Examples
use strided_basic::{RawStridedRef, RawStridedMut};
use strided_basic::execution::*;
use core::mem::MaybeUninit;
use strided_basic::DynamicUpdateSlicePlan;
let plan = DynamicUpdateSlicePlan::compile(&[3], &[1], &[1], &[1], &[1], &[1], &[3], &[1]).unwrap();
let src = RawStridedRef::new(&[1_i32, 2, 3], &[3], &[1], 0).unwrap();
let update = RawStridedRef::new(&[9_i32], &[1], &[1], 0).unwrap();
let starts = RawStridedRef::new(&[1_i32], &[1], &[1], 0).unwrap();
let mut values = [MaybeUninit::<i32>::uninit(); 3];
let mut dst = RawStridedMut::new(&mut values, &[3], &[1], 0).unwrap();
// SAFETY: all inputs are initialized and disjoint from the matching output.
unsafe { dynamic_update_into_uninit(&plan, &mut dst, &src, &update, &starts) }.unwrap();
assert_eq!(unsafe { values[1].assume_init() }, 9);§Errors
Forwards the plan layout/index validation errors.