1 2 3 4 5 6 7 8 9 10 11 12 13 14
/// Element types supported by Forge 1.0: f32 compute, u32 indices. #[derive(Debug, Clone, Copy, PartialEq, Eq)] pub enum DType { F32, U32, } impl DType { pub fn size_bytes(self) -> usize { match self { DType::F32 | DType::U32 => 4, } } }