Expand description
Execution contract for operation-family implementations.
This module is the shared kernel-extension interface, not a public mirror of implementation modules. Prevalidated entries require the caller to prove the exact destination geometry and every omitted shape check. A layout marker alone does not prove those obligations. Ordinary callers should use the checked APIs at the crate root. All families share the same execution policy.
§Examples
use strided_basic::{StridedArray, execution::*};
let src = StridedArray::<f64>::col_major(&[2]);
let mut dst = StridedArray::<f64>::col_major(&[2]);
let marker = validate_destination_layout_without_alloc(&[2], &[1]).unwrap();
// SAFETY: both arrays have shape [2], distinct storage, and the checked layout.
unsafe { map_into_validated(&mut dst.view_mut(), &src.view(), |x| x, marker) }.unwrap();A marker alone does not make the prevalidated entry safe to call:
ⓘ
use strided_basic::{StridedArray, execution::*};
let src = StridedArray::<f64>::col_major(&[2]);
let mut dst = StridedArray::<f64>::col_major(&[2]);
let marker = validate_destination_layout_without_alloc(&[2], &[1]).unwrap();
map_into_validated(&mut dst.view_mut(), &src.view(), |x| x, marker).unwrap();Structs§
- Kernel
Plan - Blocking metadata produced by the execution planners; not a layout-validity proof.
- Validated
Destination Layout - Internal validation marker used by kernel-family execution adapters.
Constants§
- SMALL_
TENSOR_ THRESHOLD - Maximum total elements for the small tensor fast path.
Tensors at or below this size skip
compute_orderandcompute_block_sizessince they fit in L1 cache and blocking provides no benefit.
Functions§
- build_
plan_ ⚠fused - Prevalidated build plan fused for kernel-family implementations.
- build_
plan_ ⚠fused_ small - Prevalidated build plan fused small for kernel-family implementations.
- check_
dtype - Check a descriptor dtype against a prepared operation.
- check_
static_ indexing_ dtype - Check whether a dtype has a static-indexing implementation.
- dynamic_
slice_ ⚠into_ uninit - Full-overwrite indexed replay for an operation-family adapter.
- dynamic_
update_ ⚠into_ uninit - Full-overwrite indexed replay for an operation-family adapter.
- ensure_
same_ shape - Check exact shape agreement before prevalidated replay.
- erased_
view - Borrow initialized element storage with owning view metadata.
- for_
each_ ⚠inner_ block_ preordered - Prevalidated for each inner block preordered for kernel-family implementations.
- gather_
into_ ⚠uninit - Full-overwrite indexed replay for an operation-family adapter.
- is_
injective_ layout - Decide whether distinct logical output positions map to distinct offsets.
- map_
into_ ⚠validated - Prevalidated map into validated for kernel-family implementations.
- map_
raw_ ⚠into_ validated - Prevalidated map raw into validated for kernel-family implementations.
- scatter_
into_ ⚠uninit - Full-overwrite indexed replay for an operation-family adapter.
- validate_
destination_ layout_ without_ alloc - Validate injectivity without allocating a set of offsets.
- validate_
uninit_ no_ overlap - Reject an input overlapping any byte of the output backing allocation.
- zip_
map2_ ⚠into_ validated - Prevalidated zip map2 into validated for kernel-family implementations.
- zip_
map2_ ⚠raw_ into_ validated - Prevalidated zip map2 raw into validated for kernel-family implementations.
- zip_
map3_ ⚠into_ validated - Prevalidated zip map3 into validated for kernel-family implementations.
- zip_
map4_ ⚠into_ validated - Prevalidated zip map4 into validated for kernel-family implementations.