Struct P64TensorEntry
#[repr(C, align(64))]pub struct P64TensorEntry {Show 13 fields
pub name_offset: u32,
pub role_id: u16,
pub dtype: u16,
pub manifold_idx: u32,
pub rank: u32,
pub dimensions: [u32; 4],
pub blob_offset: u32,
pub blob_size: u32,
pub source_offset: u64,
pub source_name_hash: u64,
pub alt_dtype: u16,
pub precision_views_mask: u16,
pub alt_blob_offset: u32,
}Fields§
§name_offset: u32§role_id: u16§dtype: u16§manifold_idx: u32§rank: u32§dimensions: [u32; 4]§blob_offset: u32§blob_size: u32§source_offset: u64§source_name_hash: u64§alt_dtype: u16§precision_views_mask: u16§alt_blob_offset: u32Implementations§
§impl P64TensorEntry
impl P64TensorEntry
pub const fn empty() -> P64TensorEntry
pub const fn empty() -> P64TensorEntry
Zeroed tensor directory entry (rank = 0).
pub fn read_le(data: &[u8]) -> Result<P64TensorEntry, String>
pub fn read_le(data: &[u8]) -> Result<P64TensorEntry, String>
Little-endian read from a 64-byte entry slice.
pub fn blob_range(&self) -> Option<Range<usize>>
pub fn blob_range(&self) -> Option<Range<usize>>
Checked byte range blob_offset..blob_offset + blob_size.
pub fn blob_slice<'a>(&self, data: &'a [u8]) -> Option<&'a [u8]>
pub fn blob_slice<'a>(&self, data: &'a [u8]) -> Option<&'a [u8]>
Checked zero-copy slice of the primary tensor blob within data.
pub const fn is_blob_aligned(&self, alignment: usize) -> bool
pub const fn is_blob_aligned(&self, alignment: usize) -> bool
True iff blob_offset is a multiple of power-of-two alignment.
Trait Implementations§
§impl Clone for P64TensorEntry
impl Clone for P64TensorEntry
§fn clone(&self) -> P64TensorEntry
fn clone(&self) -> P64TensorEntry
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 P64TensorEntry
§impl Debug for P64TensorEntry
impl Debug for P64TensorEntry
§impl Default for P64TensorEntry
impl Default for P64TensorEntry
§fn default() -> P64TensorEntry
fn default() -> P64TensorEntry
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for P64TensorEntry
impl RefUnwindSafe for P64TensorEntry
impl Send for P64TensorEntry
impl Sync for P64TensorEntry
impl Unpin for P64TensorEntry
impl UnsafeUnpin for P64TensorEntry
impl UnwindSafe for P64TensorEntry
Blanket Implementations§
§impl<S, A> Aggregate<Result<S, Error>> for Awhere
A: Aggregate<S>,
impl<S, A> Aggregate<Result<S, Error>> for Awhere
A: Aggregate<S>,
Aggregate shares in an MPC protocol.
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more§impl<T> NoneValue for Twhere
T: Default,
impl<T> NoneValue for Twhere
T: Default,
type NoneType = T
§fn null_value() -> T
fn null_value() -> T
The none-equivalent value.