pub struct TensorBufferView<'a> { /* private fields */ }Implementations§
Source§impl<'a> TensorBufferView<'a>
impl<'a> TensorBufferView<'a>
Sourcepub fn new_with_index(buffer: &'a [u8], index_table: &'a [u64]) -> Self
pub fn new_with_index(buffer: &'a [u8], index_table: &'a [u64]) -> Self
Create a view from a byte buffer with an index table.
Zero-heap consideration: No allocation, just creates a view struct Binary IPC: Index table enables O(1) node lookup without string parsing
Sourcepub fn new(buffer: &'a [u8]) -> Self
pub fn new(buffer: &'a [u8]) -> Self
Create a view from a byte buffer without an index table. Reads the canonical Q42 f32 ABI and retains compatibility with legacy Studio f64 preview buffers.
Sourcepub fn get_by_index(&self, index: u64) -> Option<Tensor10DView>
pub fn get_by_index(&self, index: u64) -> Option<Tensor10DView>
Get a tensor by binary index pointer (zero-heap O(1) lookup)
Zero-heap consideration: Returns stack-allocated Tensor10D struct Binary IPC: Uses u64 index instead of String, avoiding heap allocation
Sourcepub fn get(&self, index: usize) -> Option<Tensor10DView>
pub fn get(&self, index: usize) -> Option<Tensor10DView>
Get a tensor at the specified index (legacy method, sequential access)
Zero-heap consideration: Returns stack-allocated Tensor10D struct No heap allocation, just byte interpretation
Sourcepub fn build_index_table(count: usize) -> Vec<u64>
pub fn build_index_table(count: usize) -> Vec<u64>
Create a binary index table from sequential tensor buffer
Zero-heap consideration: Returns Vec<u64> (heap-allocated, but this is a one-time construction cost. The actual runtime access is zero-heap.) Binary IPC: This table is sent once, then reused for O(1) lookups
Sourcepub fn build_q42_index_table(count: usize) -> Vec<u64>
pub fn build_q42_index_table(count: usize) -> Vec<u64>
Build record-relative offsets for canonical Q42 Tensor10D buffers.
Trait Implementations§
Source§impl<'a> Clone for TensorBufferView<'a>
impl<'a> Clone for TensorBufferView<'a>
impl<'a> Copy for TensorBufferView<'a>
Auto Trait Implementations§
impl<'a> Freeze for TensorBufferView<'a>
impl<'a> RefUnwindSafe for TensorBufferView<'a>
impl<'a> Send for TensorBufferView<'a>
impl<'a> Sync for TensorBufferView<'a>
impl<'a> Unpin for TensorBufferView<'a>
impl<'a> UnsafeUnpin for TensorBufferView<'a>
impl<'a> UnwindSafe for TensorBufferView<'a>
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>,
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
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> InitializeFromFunction<T> for T
impl<T> InitializeFromFunction<T> for T
§fn initialize_from_function(f: fn() -> T) -> T
fn initialize_from_function(f: fn() -> T) -> T
§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> ⓘ
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> ⓘ
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