Skip to main content

Module view

Module view 

Source
Expand description

Zero-copy N-dimensional strided tensor view.

TensorView is the core rank-N view over a borrowed slice. Shape and strides are [usize; N] arrays resolved at compile time — the const generic N is erased after monomorphization, leaving no runtime overhead vs. a hand-written 2-D or 3-D struct.

This module is split by concern:

  • mod.rs (here): the core struct, marker impls, constructors, and the rank-agnostic shape/stride/element accessors.
  • rank_ops (private): rank-2 and rank-3 specialized views (rows, columns, diagonal, matrix_at, transpose).
  • simd_bridge (private): the zero-copy rank-1 → SimdView seam.

Structs§

TensorView
Zero-copy N-dimensional strided view over a borrowed slice.