Skip to main content

QuantRange

Trait QuantRange 

Source
pub trait QuantRange:
    Clone
    + Debug
    + Send
    + Sync
    + 'static {
    const QMIN: f32;
    const QMAX: f32;
    const BITS: u8;
}
Expand description

Marker trait that supplies the clamp constants for a quantization bit-width.

Required Associated Constants§

Source

const QMIN: f32

Minimum quantized value (inclusive).

Source

const QMAX: f32

Maximum quantized value (inclusive).

Source

const BITS: u8

Bit width (4 or 8).

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl QuantRange for Int4Range

Source§

const QMIN: f32 = -8.0

Source§

const QMAX: f32 = 7.0

Source§

const BITS: u8 = 4

Source§

impl QuantRange for Int8Range

Source§

const QMIN: f32 = -128.0

Source§

const QMAX: f32 = 127.0

Source§

const BITS: u8 = 8