Skip to main content

forge/
dtype.rs

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