Files
candle/src/dtype.rs
2023-06-19 17:34:13 +01:00

15 lines
240 B
Rust

#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)]
pub enum DType {
F32,
F64,
}
impl DType {
pub fn size_in_bytes(&self) -> usize {
match self {
Self::F32 => 4,
Self::F64 => 8,
}
}
}