Struct FastCpuExecutor

Source
pub struct FastCpuExecutor<'a, T: TowerFamily, P: PackedTop<T>> { /* private fields */ }

Implementations§

Source§

impl<'a, T: TowerFamily, P: PackedTop<T>> FastCpuExecutor<'a, T, P>

Source

pub fn new(kernel_buffers: &'a ThreadLocal<RefCell<Vec<P>>>) -> Self

Trait Implementations§

Source§

impl<'a, T: TowerFamily, P: PackedTop<T>> ComputeLayerExecutor<<T as TowerFamily>::B128> for FastCpuExecutor<'a, T, P>

Source§

type KernelExec = FastKernelBuilder<T, P>

The executor that can execute operations on a kernel-level granularity (i.e., a single core).
Source§

type DevMem = PackedMemory<P>

The device memory.
Source§

type OpValue = <T as TowerFamily>::B128

The operation (scalar) value type.
Source§

type ExprEval = ArithCircuitPoly<<T as TowerFamily>::B128>

The evaluator for arithmetic expressions (polynomials).
Source§

fn inner_product( &mut self, a_in: SubfieldSlice<'_, T::B128, Self::DevMem>, b_in: <Self::DevMem as ComputeMemory<T::B128>>::FSlice<'_>, ) -> Result<Self::OpValue, Error>

Returns the inner product of a vector of subfield elements with big field elements. Read more
Source§

fn tensor_expand( &mut self, log_n: usize, coordinates: &[T::B128], data: &mut <Self::DevMem as ComputeMemory<T::B128>>::FSliceMut<'_>, ) -> Result<(), Error>

Computes the iterative tensor product of the input with the given coordinates. Read more
Source§

fn accumulate_kernels( &mut self, map: impl Sync + for<'b> Fn(&'b mut Self::KernelExec, usize, Vec<KernelBuffer<'b, T::B128, Self::DevMem>>) -> Result<Vec<T::B128>, Error>, mem_maps: Vec<KernelMemMap<'_, T::B128, Self::DevMem>>, ) -> Result<Vec<Self::OpValue>, Error>

Launch many kernels in parallel and accumulate the scalar results with field addition. Read more
Source§

fn fold_left( &mut self, mat: SubfieldSlice<'_, T::B128, Self::DevMem>, vec: <Self::DevMem as ComputeMemory<T::B128>>::FSlice<'_>, out: &mut <Self::DevMem as ComputeMemory<T::B128>>::FSliceMut<'_>, ) -> Result<(), Error>

Computes left matrix-vector multiplication of a subfield matrix with a big field vector. Read more
Source§

fn fold_right( &mut self, mat: SubfieldSlice<'_, T::B128, Self::DevMem>, vec: <Self::DevMem as ComputeMemory<T::B128>>::FSlice<'_>, out: &mut <Self::DevMem as ComputeMemory<T::B128>>::FSliceMut<'_>, ) -> Result<(), Error>

Computes right matrix-vector multiplication of a subfield matrix with a big field vector. Read more
Source§

fn fri_fold<FSub>( &mut self, ntt: &(impl AdditiveNTT<FSub> + Sync), log_len: usize, log_batch_size: usize, challenges: &[T::B128], data_in: <Self::DevMem as ComputeMemory<T::B128>>::FSlice<'_>, data_out: &mut <Self::DevMem as ComputeMemory<T::B128>>::FSliceMut<'_>, ) -> Result<(), Error>
where FSub: BinaryField, T::B128: ExtensionField<FSub>,

FRI-fold the interleaved codeword using the given challenges. Read more
Source§

fn extrapolate_line( &mut self, evals_0: &mut <Self::DevMem as ComputeMemory<T::B128>>::FSliceMut<'_>, evals_1: <Self::DevMem as ComputeMemory<T::B128>>::FSlice<'_>, z: T::B128, ) -> Result<(), Error>

Extrapolates a line between a vector of evaluations at 0 and evaluations at 1. Read more
Source§

fn compute_composite( &mut self, inputs: &SlicesBatch<<Self::DevMem as ComputeMemory<T::B128>>::FSlice<'_>>, output: &mut <Self::DevMem as ComputeMemory<T::B128>>::FSliceMut<'_>, composition: &ArithCircuitPoly<T::B128>, ) -> Result<(), Error>

Computes the elementwise application of a compiled arithmetic expression to multiple input slices. Read more
Source§

fn join<Out1, Out2>( &mut self, op1: impl FnOnce(&mut Self) -> Result<Out1, Error>, op2: impl FnOnce(&mut Self) -> Result<Out2, Error>, ) -> Result<(Out1, Out2), Error>

Creates an operation that depends on the concurrent execution of two inner operations.
Source§

fn map<Out, I>( &mut self, iter: I, map: impl Fn(&mut Self, <I as Iterator>::Item) -> Result<Out, Error>, ) -> Result<Vec<Out>, Error>

Creates an operation that depends on the concurrent execution of a sequence of operations.

Auto Trait Implementations§

§

impl<'a, T, P> Freeze for FastCpuExecutor<'a, T, P>

§

impl<'a, T, P> RefUnwindSafe for FastCpuExecutor<'a, T, P>

§

impl<'a, T, P> Send for FastCpuExecutor<'a, T, P>

§

impl<'a, T, P> Sync for FastCpuExecutor<'a, T, P>

§

impl<'a, T, P> Unpin for FastCpuExecutor<'a, T, P>

§

impl<'a, T, P> UnwindSafe for FastCpuExecutor<'a, T, P>

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> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
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> IntoEither for T

Source§

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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

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
§

impl<T> Pointable for T

§

const ALIGN: usize

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
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.
§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a [WithDispatch] wrapper. Read more