pub unsafe fn build_plan_fused(
dims: &[usize],
strides_list: &[&[isize]],
dest_index: Option<usize>,
elem_size: usize,
) -> (InlineVec<usize>, OperandVec<InlineVec<isize>>, KernelPlan)Expand description
Prevalidated build plan fused for kernel-family implementations.
§Safety
All rank-indexed arrays must have matching lengths and a valid destination index (when present). Shape products, stride magnitudes, cost arithmetic, and every intermediate offset used by planning/iteration must be representable. Iteration blocks must be positive and offsets must correspond to the supplied layouts; threaded partitioning additionally requires positive costs. Callback memory accesses must be valid for each generated block, with disjoint mutable regions when partitions execute concurrently.
§Examples
use strided_basic::execution::*;
// SAFETY: the example supplies matching bounded layouts and disjoint storage.
let (dims, _, plan) = unsafe { build_plan_fused(&[2, 3], &[&[1, 2]], Some(0), 8) };
assert_eq!(dims.iter().product::<usize>(), 6);
assert_eq!(plan.block.len(), dims.len());