microflow/buffer.rs
1use nalgebra::SMatrix;
2
3/// Represents a 2-dimensional buffer.
4/// A 2-dimensional buffer is composed by a [`SMatrix`] of values `T`.
5pub type Buffer2D<T, const ROWS: usize, const COLUMNS: usize> = SMatrix<T, ROWS, COLUMNS>;
6
7/// Represents a 4-dimensional buffer.
8/// A 4-dimensional buffer is composed by an array of [`Buffer2D`] containing an array of values
9/// `T`.
10pub type Buffer4D<
11 T,
12 const BATCHES: usize,
13 const ROWS: usize,
14 const COLUMNS: usize,
15 const CHANNELS: usize,
16> = [Buffer2D<[T; CHANNELS], ROWS, COLUMNS>; BATCHES];