Expand description
N-ary Einstein summation for mdarray arrays.
This crate provides a thin wrapper over strided_opteinsum that accepts
mdarray Array<T, DynRank> and View<T, DynRank> types directly.
Row-major / column-major layout conversion is handled transparently.
§Example
ⓘ
use mdarray::{Array, DynRank};
use mdarray_opteinsum::einsum;
let a: Array<f64, DynRank> = /* 3x4 matrix */;
let b: Array<f64, DynRank> = /* 4x5 matrix */;
let c: Array<f64, DynRank> = einsum("ij,jk->ik", vec![(&a).into(), (&b).into()])?;Modules§
Enums§
- Error
- Error type for mdarray-opteinsum operations.
- MdOperand
- A type-erased einsum operand wrapping mdarray types.
Functions§
- einsum
- Parse and evaluate an einsum expression on mdarray operands.
- einsum_
into - Parse and evaluate an einsum expression, writing the result into a pre-allocated mdarray output with alpha/beta scaling.