pub struct ZensimScratch { /* private fields */ }Expand description
Reusable scratch buffers for crate::Zensim::compute_with_ref_into.
Designed for encoder quantization loops that call compute_with_ref many
times against the same precomputed reference. Holds the distorted-side
XYB plane allocation across calls so it isn’t freed and reallocated each
iteration.
At 1920×1080 the per-call dst plane allocation is ~25 MB; at 3840×2160 it is ~99 MB. Reusing the allocation skips the kernel page-fault commit on subsequent calls.
Implementations§
Source§impl ZensimScratch
impl ZensimScratch
Trait Implementations§
Source§impl Default for ZensimScratch
impl Default for ZensimScratch
Source§fn default() -> ZensimScratch
fn default() -> ZensimScratch
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for ZensimScratch
impl RefUnwindSafe for ZensimScratch
impl Send for ZensimScratch
impl Sync for ZensimScratch
impl Unpin for ZensimScratch
impl UnsafeUnpin for ZensimScratch
impl UnwindSafe for ZensimScratch
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> 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