#[repr(C)]pub struct ScratchOwned<B>where
B: Backend,{
pub data: <B as Backend>::OwnedBuf,
pub _phantom: PhantomData<B>,
}Expand description
Owned scratch buffer for temporary workspace during polynomial operations.
Operations such as normalization, DFT, and vector-matrix products require
temporary scratch memory. ScratchOwned holds a backend-owned buffer that
can be borrowed as a ScratchArena.
The required size for each operation is obtained via the corresponding
*_tmp_bytes method on the API trait (e.g.
VecZnxNormalizeTmpBytes).
Fields§
§data: <B as Backend>::OwnedBuf§_phantom: PhantomData<B>Implementations§
Source§impl<B> ScratchOwned<B>where
B: Backend,
impl<B> ScratchOwned<B>where
B: Backend,
Sourcepub fn arena(&mut self) -> ScratchArena<'_, B>
pub fn arena(&mut self) -> ScratchArena<'_, B>
Borrows this owned scratch buffer as a backend-native arena.
Trait Implementations§
Source§impl<B> ScratchOwnedAlloc<B> for ScratchOwned<B>where
B: Backend,
impl<B> ScratchOwnedAlloc<B> for ScratchOwned<B>where
B: Backend,
fn alloc(size: usize) -> ScratchOwned<B>
Source§impl<B> ScratchOwnedBorrow<B> for ScratchOwned<B>where
B: Backend,
impl<B> ScratchOwnedBorrow<B> for ScratchOwned<B>where
B: Backend,
fn borrow(&mut self) -> ScratchArena<'_, B>
Auto Trait Implementations§
impl<B> Freeze for ScratchOwned<B>
impl<B> RefUnwindSafe for ScratchOwned<B>
impl<B> Send for ScratchOwned<B>
impl<B> Sync for ScratchOwned<B>
impl<B> Unpin for ScratchOwned<B>
impl<B> UnsafeUnpin for ScratchOwned<B>
impl<B> UnwindSafe for ScratchOwned<B>
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