strided-rs is a Rust workspace for strided tensor views, kernels, and einsum.
It is inspired by Julia's Strided.jl,
StridedViews.jl, and
OMEinsum.jl.
The recommended user-facing crate is strided-rs.
Use individual crates such as strided-perm, strided-view, or
strided-kernel directly when you need a smaller dependency surface or a
lower-level API.
strided-rs: facade crate that re-exports the main workspace APIsstrided-traits: shared scalar and element-operation traitsstrided-view: core dynamic-rank strided view/array types and metadata opsstrided-perm: cache-efficient tensor permutation / transposestrided-kernel: cache-optimized elementwise/reduction kernels over strided viewsstrided-einsum2: binary einsum (einsum2_into) on strided tensorsstrided-opteinsum: N-ary einsum frontend with nested notation and contraction-order optimizationmdarray-opteinsum: einsum wrapper formdarrayarrays (row-major ↔ column-major transparent conversion)ndarray-opteinsum: einsum wrapper forndarrayarrays (direct strides passthrough)
- Dynamic-rank strided views (
StridedView/StridedViewMut) over contiguous memory - Owned strided arrays (
StridedArray) with row-major and column-major constructors - Lazy element operations (conjugate, transpose, adjoint) with type-level composition
- Zero-copy transformations: permuting, transposing, broadcasting
- Cache-optimized iteration with automatic blocking and loop reordering
- Optional multi-threading via Rayon (
parallelfeature) with recursive dimension splitting
These crates are being prepared for crates.io publication, but this repository does not publish them automatically. Until a release is published, use workspace path dependencies:
[dependencies]
strided-rs = { path = "../strided-rs/strided-rs" }After publication, use:
[dependencies]
strided-rs = "0.1"Generate API docs locally:
cargo doc --workspace --no-depsOpen docs locally:
open target/doc/index.htmlCI also builds rustdoc on PRs and deploys workspace docs to GitHub Pages on main.
See the strided-rs Quick Start. The Rust
example there is included in crate docs and verified by doctests in CI.
See each sub-crate README for detailed API examples and benchmarks:
strided-rs— recommended facade crate and executable Quick Startstrided-view— types, view operationsstrided-perm— permutation and transpose kernelsstrided-kernel— map/reduce/broadcast kernels, benchmarksstrided-einsum2— binary einsum with GEMM backendstrided-opteinsum— N-ary einsum, benchmarksmdarray-opteinsum— einsum wrapper formdarrayarraysndarray-opteinsum— einsum wrapper forndarrayarrays
This crate is inspired by and ports functionality from:
- Strided.jl by Jutho
- StridedViews.jl by Jutho
- OMEinsum.jl for
strided-opteinsumdesign ideas and reference test-case patterns
Licensed under either of:
- Apache License, Version 2.0 (
LICENSE-APACHE) - MIT license (
LICENSE-MIT)
See NOTICE for upstream attribution (Strided.jl / StridedViews.jl are MIT-licensed).