use std::fmt::Debug;
pub trait Format: Copy + Debug + Default {
type NonDense: NonDense;
type UnitStrided: UnitStrided;
}
pub trait NonDense: Format {}
pub trait UnitStrided: Format {}
#[derive(Clone, Copy, Debug, Default)]
pub struct Dense;
#[derive(Clone, Copy, Debug, Default)]
pub struct General;
#[derive(Clone, Copy, Debug, Default)]
pub struct Strided;
impl Format for Dense {
type NonDense = General;
type UnitStrided = Dense;
}
impl Format for General {
type NonDense = General;
type UnitStrided = General;
}
impl Format for Strided {
type NonDense = Strided;
type UnitStrided = General;
}
impl NonDense for General {}
impl NonDense for Strided {}
impl UnitStrided for Dense {}
impl UnitStrided for General {}