Layout
darkforest-core
module: tensor
since v0.1.0-alpha
Signature
rust
pub enum Layout { Contiguous, Strided, Broadcasted }
Overview
Memory layout categorization used by kernel dispatchers to select optimal vectorized loops.
Invariants & Design Principles
- Invariant: Contiguous layouts dispatch directly to SIMD vectorized assembly.
Usage Example
rust
match tensor.layout() { Layout::Contiguous => (), _ => () }