#[non_exhaustive]pub enum StateStorageDtype {
F16,
Bf16,
F32,
F64,
Complex64,
I32,
U32,
}Expand description
Physical scalar representation selected for native mutable state.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
F16
IEEE half precision.
Bf16
Brain floating point.
F32
IEEE single precision.
F64
IEEE double precision.
Complex64
Two IEEE single-precision components.
I32
Signed 32-bit integer.
U32
Unsigned 32-bit integer.
Implementations§
Source§impl StateStorageDtype
impl StateStorageDtype
Sourcepub const fn is_floating(self) -> bool
pub const fn is_floating(self) -> bool
Whether this representation belongs to the model’s floating state family.
Sourcepub const fn resolve(
policy: StateTensorDtype,
floating: Option<Self>,
) -> Option<Self>
pub const fn resolve( policy: StateTensorDtype, floating: Option<Self>, ) -> Option<Self>
Resolves an architecture dtype policy without overriding fixed-width tensors.
Trait Implementations§
Source§impl Clone for StateStorageDtype
impl Clone for StateStorageDtype
Source§fn clone(&self) -> StateStorageDtype
fn clone(&self) -> StateStorageDtype
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for StateStorageDtype
Source§impl Debug for StateStorageDtype
impl Debug for StateStorageDtype
impl Eq for StateStorageDtype
Source§impl PartialEq for StateStorageDtype
impl PartialEq for StateStorageDtype
impl StructuralPartialEq for StateStorageDtype
Auto Trait Implementations§
impl Freeze for StateStorageDtype
impl RefUnwindSafe for StateStorageDtype
impl Send for StateStorageDtype
impl Sync for StateStorageDtype
impl Unpin for StateStorageDtype
impl UnsafeUnpin for StateStorageDtype
impl UnwindSafe for StateStorageDtype
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more