Skip to main content

Module execution

Module execution 

Source
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§

KernelPlan
Blocking metadata produced by the execution planners; not a layout-validity proof.
ValidatedDestinationLayout
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_order and compute_block_sizes since 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.