Split the tensor file.

This commit is contained in:
laurent
2023-06-19 17:34:13 +01:00
parent 9698211d56
commit 844704de5c
5 changed files with 48 additions and 32 deletions

14
src/dtype.rs Normal file
View File

@ -0,0 +1,14 @@
#[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,
}
}
}