pub fn einsum_owned<Alg, Backend>(
ctx: &mut BackendContext<Alg, Backend>,
subscripts: &str,
operands: Vec<Tensor<Alg::Scalar>>,
size_dict: Option<&HashMap<u32, usize>>,
) -> Result<Tensor<Alg::Scalar>>where
Alg: Semiring,
Alg::Scalar: Scalar + Conjugate + HasAlgebra<Algebra = Alg>,
Backend: EinsumBackend<Alg>,
BackendContext<Alg, Backend>: TensorTempPoolContext,Expand description
Execute einsum using string notation, consuming the input tensors.
Unlike the borrowed entry point, this keeps canonicalization on an owning path and only borrows after the owned operands have been normalized for execution.
§Examples
ⓘ
use tenferro_algebra::Standard;
use tenferro_einsum::einsum_owned;
use tenferro_prims::{CpuBackend, CpuContext};
let mut ctx = CpuContext::new(1);
let out = einsum_owned::<Standard<f64>, CpuBackend>(&mut ctx, "ij,jk->ik", vec![a, b], None)
.unwrap();