docsapi referencedarkforest-core-tensor-strides
API Referencecrate: darkforest-coresince v0.1.0-alpha

Strides

Signed stride representation enabling negative stepping, transpositions, and multi-axis permutations.

Strides

darkforest-core module: tensor since v0.1.0-alpha

Signature

rust
pub struct Strides { strides: SmallVec<[isize; 6]> }

Overview

Signed stride representation enabling negative stepping, transpositions, and multi-axis permutations.

Invariants & Design Principles

  • Invariant: Negative strides permitted for reverse views (e.g., flip, reverse slice).
  • Invariant: Row-major (C-contiguous) default with column-major conversion support.

Usage Example

rust
let strides = Strides::from_slice(&[64, 1]);

Related Components