Skip to main content

cubecl_runtime/config/
size.rs

1/// A byte count.
2///
3/// A thin newtype over `u64` so pool settings like `page_size` are
4/// unambiguously in bytes at the type level.
5#[derive(Clone, Copy, Debug, PartialEq, Eq, PartialOrd, Ord, Hash)]
6pub struct MemorySize(pub u64);
7
8impl MemorySize {
9    /// The size in bytes.
10    pub const fn bytes(self) -> u64 {
11        self.0
12    }
13}