pub struct JitMatrix {
pub data: *const f64,
pub rows: u32,
pub cols: u32,
pub total_len: u64,
/* private fields */
}Expand description
Native JIT matrix — a flat f64 buffer with row/col dimensions.
The data pointer points directly into the owned Arc<MatrixData>’s
AlignedVec<f64>, giving the JIT zero-copy access to the underlying
SIMD-aligned storage.
Fields§
§data: *const f64Pointer to the flat f64 data buffer (row-major order).
NOT owned — lifetime tied to owner.
rows: u32Number of rows.
cols: u32Number of columns.
total_len: u64Total element count (rows * cols), cached.
Implementations§
Source§impl JitMatrix
impl JitMatrix
Sourcepub fn from_arc(arc: &Arc<MatrixData>) -> Self
pub fn from_arc(arc: &Arc<MatrixData>) -> Self
Create a JitMatrix from an Arc<MatrixData>.
Leaks one Arc strong reference to keep the data alive. The Drop
impl reconstitutes the Arc and releases it.
Sourcepub fn to_arc(&self) -> Arc<MatrixData>
pub fn to_arc(&self) -> Arc<MatrixData>
Reconstitute the owned Arc<MatrixData> without dropping it.
Returns a new Arc clone. The JitMatrix retains its own reference (will be released on drop).
Trait Implementations§
Auto Trait Implementations§
impl Freeze for JitMatrix
impl RefUnwindSafe for JitMatrix
impl !Send for JitMatrix
impl !Sync for JitMatrix
impl Unpin for JitMatrix
impl UnsafeUnpin for JitMatrix
impl UnwindSafe for JitMatrix
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> 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