#[repr(transparent)]pub struct U8(pub u8);Expand description
Unsigned 8-bit integer element marker. #[repr(transparent)] around
u8.
Identical memory layout to u8, so a DeviceBuffer<u8> (byte
substrate) can be reinterpreted as a DeviceBuffer<U8> (quantized
GEMM operand) via view_as without copying. The wrapper exists to
disambiguate “byte buffer” from “quantized operand” at the Rust type
level — a DeviceBuffer<U8> is unambiguously a GEMM operand,
DeviceBuffer<u8> stays a byte-storage abstraction.
Numerical contract: same as S8 except the multiply operands are
unsigned. The accumulator is still int32 and alpha/beta are still
float; saturating cast at store clamps to [0, 255].
Tuple Fields§
§0: u8Trait Implementations§
impl Copy for U8
impl DeviceRepr for U8
impl Eq for U8
impl IntElement for U8
Source§impl KernelDtype for U8
impl KernelDtype for U8
Source§const KIND: ElementKind = ElementKind::U8
const KIND: ElementKind = ElementKind::U8
Runtime tag for this dtype. Stable across the workspace —
keyed by this same enum in
crate::KernelSku::element.Source§impl Ord for U8
impl Ord for U8
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialOrd for U8
impl PartialOrd for U8
impl StructuralPartialEq for U8
Auto Trait Implementations§
impl Freeze for U8
impl RefUnwindSafe for U8
impl Send for U8
impl Sync for U8
impl Unpin for U8
impl UnsafeUnpin for U8
impl UnwindSafe for U8
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