Skip to main content

Module opteinsum

Module opteinsum 

Source
Expand description

N-ary optimized einsum frontend.

Modules§

error
Error types for einsum operations.
expr
Recursive contraction-tree evaluation.
operand
Type-erased einsum operands (f64 / Complex64, owned / borrowed).
parse
Nested einsum string parser.
single_tensor
Single-tensor operations (permute, trace, diagonal extraction).
typed_tensor
Runtime type dispatch over f64 and Complex64 tensors.

Structs§

BufferPool
Reusable buffer pool for intermediate tensor allocations.
EinsumCode
Parsed einsum code: contraction tree + final output indices.

Enums§

EinsumError
Errors that can occur during einsum parsing or evaluation.
EinsumNode
Parsed contraction tree node (no operands, just structure).
EinsumOperand
A type-erased einsum operand holding either f64 or Complex64 strided data.
StridedData
Type-erased strided data that can be either owned or borrowed.
TypedTensor
A type-erased tensor that dispatches over f64 and Complex64 at runtime.

Traits§

EinsumScalar
Scalar types that can be used as the output element type for einsum_into.

Functions§

einsum
Parse and evaluate an einsum expression in one call.
einsum_into
Parse and evaluate an einsum expression, writing the result into a pre-allocated output buffer with alpha/beta scaling.
einsum_into_with_pool
Parse and evaluate an einsum expression into an output buffer with optional buffer pool reuse.
einsum_with_pool
Parse and evaluate an einsum expression with optional buffer pool reuse.
needs_c64_promotion
Returns true if any input is Complex64 (triggering promotion for all).
parse_einsum
Parse an einsum string like “(ij,jk),kl->il” into an EinsumCode.

Type Aliases§

Result
Convenience alias for Result<T, EinsumError>.