pub struct FixedPointQNumeric<const INT_BITS: u32, const FRAC_BITS: u32>;Expand description
Parametric Q-format fixed-point arithmetic.
INT_BITS + FRAC_BITS ≤ 64 and INT_BITS + FRAC_BITS ≥ 1. Values
are two’s-complement signed integers in the canonical 64-bit
container; the INT_BITS/FRAC_BITS split governs the implicit
decimal point and the multiplication re-scaling.
Trait Implementations§
Source§impl<const INT_BITS: u32, const FRAC_BITS: u32> AxisExtension for FixedPointQNumeric<INT_BITS, FRAC_BITS>
impl<const INT_BITS: u32, const FRAC_BITS: u32> AxisExtension for FixedPointQNumeric<INT_BITS, FRAC_BITS>
Source§const AXIS_ADDRESS: &'static str = <FixedPointQNumeric<INT_BITS, FRAC_BITS> as FixedPointAxis>::AXIS_ADDRESS
const AXIS_ADDRESS: &'static str = <FixedPointQNumeric<INT_BITS, FRAC_BITS> as FixedPointAxis>::AXIS_ADDRESS
ADR-017 content address of this axis trait. The SDK macro
derives this from the trait name and method signatures.
Source§const MAX_OUTPUT_BYTES: usize = <FixedPointQNumeric<INT_BITS, FRAC_BITS> as FixedPointAxis>::MAX_OUTPUT_BYTES
const MAX_OUTPUT_BYTES: usize = <FixedPointQNumeric<INT_BITS, FRAC_BITS> as FixedPointAxis>::MAX_OUTPUT_BYTES
Maximum bytes any kernel of this axis returns.
Source§fn dispatch_kernel(
kernel_id: u32,
input: &[u8],
out: &mut [u8],
) -> Result<usize, ShapeViolation>
fn dispatch_kernel( kernel_id: u32, input: &[u8], out: &mut [u8], ) -> Result<usize, ShapeViolation>
Dispatch the kernel identified by
kernel_id against the
evaluated input bytes. The implementation copies the kernel’s
output into out and returns the written length. Read moreSource§impl<const INT_BITS: u32, const FRAC_BITS: u32> Clone for FixedPointQNumeric<INT_BITS, FRAC_BITS>
impl<const INT_BITS: u32, const FRAC_BITS: u32> Clone for FixedPointQNumeric<INT_BITS, FRAC_BITS>
Source§fn clone(&self) -> FixedPointQNumeric<INT_BITS, FRAC_BITS>
fn clone(&self) -> FixedPointQNumeric<INT_BITS, FRAC_BITS>
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 moreSource§impl<const INT_BITS: u32, const FRAC_BITS: u32> Debug for FixedPointQNumeric<INT_BITS, FRAC_BITS>
impl<const INT_BITS: u32, const FRAC_BITS: u32> Debug for FixedPointQNumeric<INT_BITS, FRAC_BITS>
Source§impl<const INT_BITS: u32, const FRAC_BITS: u32> FixedPointAxis for FixedPointQNumeric<INT_BITS, FRAC_BITS>
impl<const INT_BITS: u32, const FRAC_BITS: u32> FixedPointAxis for FixedPointQNumeric<INT_BITS, FRAC_BITS>
Source§const AXIS_ADDRESS: &'static str = "https://uor.foundation/axis/FixedPointAxis/Q"
const AXIS_ADDRESS: &'static str = "https://uor.foundation/axis/FixedPointAxis/Q"
ADR-017 content address.
Source§const MAX_OUTPUT_BYTES: usize = WIDTH
const MAX_OUTPUT_BYTES: usize = WIDTH
Operand byte-width (fixed 8 bytes = i64 container).
Source§impl<const INT_BITS: u32, const FRAC_BITS: u32> SubstrateTermBody for FixedPointQNumeric<INT_BITS, FRAC_BITS>
impl<const INT_BITS: u32, const FRAC_BITS: u32> SubstrateTermBody for FixedPointQNumeric<INT_BITS, FRAC_BITS>
Source§fn body_arena() -> &'static [Term]
fn body_arena() -> &'static [Term]
The Term arena the kernel decomposes to. Empty slice signals a
primitive-fast-path axis whose body the implementation may evaluate
through
dispatch_kernel directly per ADR-055’s optional fast-path.impl<const INT_BITS: u32, const FRAC_BITS: u32> Copy for FixedPointQNumeric<INT_BITS, FRAC_BITS>
impl<const INT_BITS: u32, const FRAC_BITS: u32> Sealed for FixedPointQNumeric<INT_BITS, FRAC_BITS>
Auto Trait Implementations§
impl<const INT_BITS: u32, const FRAC_BITS: u32> Freeze for FixedPointQNumeric<INT_BITS, FRAC_BITS>
impl<const INT_BITS: u32, const FRAC_BITS: u32> RefUnwindSafe for FixedPointQNumeric<INT_BITS, FRAC_BITS>
impl<const INT_BITS: u32, const FRAC_BITS: u32> Send for FixedPointQNumeric<INT_BITS, FRAC_BITS>
impl<const INT_BITS: u32, const FRAC_BITS: u32> Sync for FixedPointQNumeric<INT_BITS, FRAC_BITS>
impl<const INT_BITS: u32, const FRAC_BITS: u32> Unpin for FixedPointQNumeric<INT_BITS, FRAC_BITS>
impl<const INT_BITS: u32, const FRAC_BITS: u32> UnsafeUnpin for FixedPointQNumeric<INT_BITS, FRAC_BITS>
impl<const INT_BITS: u32, const FRAC_BITS: u32> UnwindSafe for FixedPointQNumeric<INT_BITS, FRAC_BITS>
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