einsum_with_plan_owned

Function einsum_with_plan_owned 

Source
pub fn einsum_with_plan_owned<T: Scalar + HasAlgebra>(
    _tree: &ContractionTree,
    _operands: Vec<Tensor<T>>,
) -> Result<Tensor<T>>
Expand description

Execute einsum with a pre-optimized ContractionTree, consuming the input tensors.

Combines the benefits of plan caching (einsum_with_plan) with buffer reuse from owned operands. Ideal for hot loops where the caller no longer needs the input tensors after contraction.

ยงErrors

Returns an error if the operand shapes do not match those used to build the contraction tree.