mirror of
https://github.com/huggingface/candle.git
synced 2025-06-16 18:48:51 +00:00
15 lines
240 B
Rust
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,
|
|
}
|
|
}
|
|
}
|