pub struct I4;Expand description
INT4: two signed 4-bit nibbles per byte. ONNX TensorProto.DataType = 22.
Trait Implementations§
Source§impl ConstrainedTypeShape for I4
impl ConstrainedTypeShape for I4
Source§const IRI: &'static str = "https://uor.foundation/type/ConstrainedType"
const IRI: &'static str = "https://uor.foundation/type/ConstrainedType"
IRI of the ontology
type:ConstrainedType instance this shape represents.Source§const SITE_COUNT: usize = PACKED_NIBBLE_BYTES
const SITE_COUNT: usize = PACKED_NIBBLE_BYTES
Number of sites (fields) this constrained type carries.
Source§const CONSTRAINTS: &'static [ConstraintRef]
const CONSTRAINTS: &'static [ConstraintRef]
Per-site constraint list. Empty means unconstrained.
Source§const CYCLE_SIZE: u64
const CYCLE_SIZE: u64
ADR-032: cardinality of the shape’s value-set (the cycle
structure of the shape under the substrate’s discrete-clock
model). Used by the
prism_model! macro to lower first_admit
(closure-body grammar G16) to the correct descent measure.
Conventions: Read moreSource§const SITE_BUDGET: usize = Self::SITE_COUNT
const SITE_BUDGET: usize = Self::SITE_COUNT
Ontology-level
siteBudget: count of data sites only,
excluding bookkeeping introduced by composition (coproduct tag
sites, etc.). Equals SITE_COUNT for leaf shapes and for
shapes whose composition introduces no bookkeeping (products,
cartesian products). Strictly less than SITE_COUNT for coproduct
shapes and any shape whose SITE_COUNT includes inherited
bookkeeping. Introduced by the Product/Coproduct Completion
Amendment §4a; defaults to SITE_COUNT so pre-amendment
shape impls remain valid without edits.Source§impl Dtype for I4
impl Dtype for I4
Source§const BLOCK_BYTES: usize = PACKED_NIBBLE_BYTES
const BLOCK_BYTES: usize = PACKED_NIBBLE_BYTES
Bytes per block. For continuous element types this is the element
byte count; for quantized types this is the block-bytes count
(= the GGML
block_q*_* sizeof).Source§const BLOCK_ELEMS: usize = PACKED_NIBBLE_ELEMS
const BLOCK_ELEMS: usize = PACKED_NIBBLE_ELEMS
Elements per block.
1 for continuous types; 32 for legacy
quantization; 256 for K-series quantization.Source§impl<'a> IntoBindingValue<'a> for I4
impl<'a> IntoBindingValue<'a> for I4
Source§fn as_binding_value<const INLINE_BYTES: usize>(
&self,
) -> TermValue<'a, INLINE_BYTES>
fn as_binding_value<const INLINE_BYTES: usize>( &self, ) -> TermValue<'a, INLINE_BYTES>
Return this input value’s canonical content-addressable bytes as a
source-polymorphic
crate::pipeline::TermValue carrier (ADR-060).
Inline for values within the derived inline width, Borrowed for
larger in-memory values (zero-copy), or Stream for unbounded
sources. The carrier borrows the input’s 'a-lived data; for an
Inline-only input it owns its bytes and is valid for any 'a.impl Copy for I4
impl GroundedShape for I4
Auto Trait Implementations§
impl Freeze for I4
impl RefUnwindSafe for I4
impl Send for I4
impl Sync for I4
impl Unpin for I4
impl UnsafeUnpin for I4
impl UnwindSafe for I4
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