Skip to main content

hurray_core/layout/
col_major.rs

1//! Column-major (Fortran-order) layout descriptor.
2//!
3//! Tag `0x02`. No extra fields — strides are implicit.
4//! See `docs/spec/layouts/column-major.md`.
5
6#[cfg(test)]
7mod tests {
8    use crate::layout::LayoutDescriptor;
9
10    #[test]
11    fn col_major_tag_is_0x02() {
12        assert_eq!(LayoutDescriptor::ColMajor.tag(), 0x02);
13    }
14
15    #[test]
16    fn col_major_buffer_count_is_1() {
17        use std::num::NonZeroU8;
18        assert_eq!(
19            LayoutDescriptor::ColMajor.buffer_count(),
20            Some(NonZeroU8::new(1).unwrap())
21        );
22    }
23}