Skip to main content

Resumable

Struct Resumable 

Source
pub struct Resumable<T>(/* private fields */);

Implementations§

Source§

impl<T> Resumable<T>

Source

pub fn new(val: T) -> Self

Source

pub fn consume(self) -> T

Trait Implementations§

Source§

impl<T: Clone> Clone for Resumable<T>

Source§

fn clone(&self) -> Resumable<T>

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<T: Debug> Debug for Resumable<T>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<T, U, R, A> SIMDSchema<T, U, A> for Resumable<R>
where A: Architecture, R: ResumableSIMDSchema<T, U, A>,

Source§

type SIMDWidth = <<R as ResumableSIMDSchema<T, U, A>>::NonResumable as SIMDSchema<T, U, A>>::SIMDWidth

The desired SIMD read width. Reads from the input slice will be use this stride when accessing memory.
Source§

type Accumulator = <<R as ResumableSIMDSchema<T, U, A>>::NonResumable as SIMDSchema<T, U, A>>::Accumulator

The type used to represent partial accumulated values.
Source§

type Left = <<R as ResumableSIMDSchema<T, U, A>>::NonResumable as SIMDSchema<T, U, A>>::Left

The type used for the left-hand side.
Source§

type Right = <<R as ResumableSIMDSchema<T, U, A>>::NonResumable as SIMDSchema<T, U, A>>::Right

The type used for the right-hand side.
Source§

type Return = Resumable<R>

The final return type. This is often f32 for complete distance functions, but need not always be.
Source§

type Main = <<R as ResumableSIMDSchema<T, U, A>>::NonResumable as SIMDSchema<T, U, A>>::Main

The implementation of the main loop.
Source§

fn init(&self, arch: A) -> Self::Accumulator

Initialize an empty (identity) accumulator.
Source§

fn accumulate( &self, x: Self::Left, y: Self::Right, acc: Self::Accumulator, ) -> Self::Accumulator

Perform an accumulation.
Source§

fn combine( &self, x: Self::Accumulator, y: Self::Accumulator, ) -> Self::Accumulator

Combine two independent accumulators (allows for unrolling).
Source§

fn reduce(&self, x: Self::Accumulator) -> Self::Return

Perform a reduction on the accumulator to yield the final result. Read more
Source§

unsafe fn epilogue( &self, arch: A, x: *const T, y: *const U, len: usize, acc: Self::Accumulator, ) -> Self::Accumulator

A supplied trait for dealing with non-full-width epilogues. Often, masked based loading will do the right thing, but for architectures like AVX2 that have limited support for masking 8 and 16-bit operations, using a scalar fallback may just be better. Read more
Source§

fn get_simd_width() -> usize

!! Do not extend this function !! Read more
Source§

fn get_main_bocksize() -> usize

!! Do not extend this function !! Read more
Source§

impl<T: Copy> Copy for Resumable<T>

Auto Trait Implementations§

§

impl<T> Freeze for Resumable<T>
where T: Freeze,

§

impl<T> RefUnwindSafe for Resumable<T>
where T: RefUnwindSafe,

§

impl<T> Send for Resumable<T>
where T: Send,

§

impl<T> Sync for Resumable<T>
where T: Sync,

§

impl<T> Unpin for Resumable<T>
where T: Unpin,

§

impl<T> UnsafeUnpin for Resumable<T>
where T: UnsafeUnpin,

§

impl<T> UnwindSafe for Resumable<T>
where T: UnwindSafe,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.