Expand description
§strided-fused
Runtime-DAG fused elementwise execution. The typed FusedPlan and dtype-erased
ErasedFusedPlan implementations use strided-basic’s shared execution policy
and generic traversal without depending on strided-kernel.
use strided_basic::StridedArray;
use strided_fused::{fused_elementwise_into, FusedInst, FusedOp, FusedPlan};
let input = StridedArray::<f64>::from_parts(vec![2.0, 3.0], &[2], &[1], 0).unwrap();
let mut output = StridedArray::<f64>::col_major(&[2]);
let plan = FusedPlan {
input_count: 1,
outputs: vec![1],
ops: vec![FusedInst { op: FusedOp::Negate, inputs: vec![0] }],
};
fused_elementwise_into(&mut [output.view_mut()], &[input.view()], &plan).unwrap();
assert_eq!(output.get(&[1]), -3.0);simd is enabled by default; parallel enables bounded parallel replay and
forwards to the shared foundation. This crate does not create an independent
thread pool. An assembling backend can retain automatic fusion by calling this
crate with its existing context and output storage; users need not select plans
manually when their runtime already performs that planning.
See kernel boundaries and the packaged license notices. This new package has not yet been published. Runtime-DAG fused elementwise execution using the shared CPU execution policy.
Structs§
- Erased
Fused Plan - Dtype-erased single-output wrapper around
FusedPlan. - Fused
Inst - One SSA instruction in a
FusedPlan. - Fused
Plan - Topologically ordered fused elementwise SSA DAG.
- Strided
View - Dynamic-rank immutable strided view with lazy element operations.
- Strided
View Mut - Dynamic-rank mutable strided view.
Enums§
- FusedOp
- Runtime scalar operation for a fused elementwise plan.
- Strided
Error - Errors that can occur during strided array operations.
Traits§
- Fused
Scalar - Scalar types supported by
fused_elementwise_into. - Maybe
Send Sync - Equivalent to
Send+Syncwhenparallelis enabled; blanket-impl otherwise.
Functions§
- fused_
elementwise_ into - Evaluate a runtime-DAG elementwise plan into one or more destinations.
Type Aliases§
- Result
- Result type for strided array operations.