Struct BivariateMLEcheckProver

Source
pub struct BivariateMLEcheckProver<'a, F: Field, Hal: ComputeLayer<F>, HostAllocatorType, DeviceAllocatorType>
where HostAllocatorType: ComputeAllocator<F, CpuMemory>, DeviceAllocatorType: ComputeAllocator<F, Hal::DevMem>,
{ /* private fields */ }
Expand description

MLEcheck prover implementation for the special case of bivariate product compositions over large-field multilinears.

This implements the SumcheckProver interface. The implementation uses a ComputeLayer instance for expensive operations and the input multilinears are provided as device memory slices.

Implementations§

Source§

impl<'a, F, Hal, HostAllocatorType, DeviceAllocatorType> BivariateMLEcheckProver<'a, F, Hal, HostAllocatorType, DeviceAllocatorType>
where F: TowerField, Hal: ComputeLayer<F>, HostAllocatorType: ComputeAllocator<F, CpuMemory>, DeviceAllocatorType: ComputeAllocator<F, Hal::DevMem>,

Source

pub fn new( hal: &'a Hal, dev_alloc: &'a DeviceAllocatorType, host_alloc: &'a HostAllocatorType, claim: &EqIndSumcheckClaim<F, IndexComposition<BivariateProduct, 2>>, multilins: Vec<FSlice<'a, F, Hal>>, eq_ind_partial_evals: FSlice<'a, F, Hal>, eq_ind_challenges: Vec<F>, ) -> Result<Self, Error>

Source

pub fn required_host_memory( claim: &EqIndSumcheckClaim<F, IndexComposition<BivariateProduct, 2>>, ) -> usize

Returns the amount of host memory this sumcheck requires.

Source

pub fn required_device_memory( claim: &EqIndSumcheckClaim<F, IndexComposition<BivariateProduct, 2>>, with_eq_ind_partial_evals: bool, ) -> usize

Returns the amount of device memory this sumcheck requires.

Source

pub fn fold_multilinears(&mut self, challenge: F) -> Result<(), Error>

Source

pub fn fold_eq_ind(&mut self) -> Result<(), Error>

Trait Implementations§

Source§

impl<F, Hal, HostAllocatorType, DeviceAllocatorType> SumcheckProver<F> for BivariateMLEcheckProver<'_, F, Hal, HostAllocatorType, DeviceAllocatorType>
where F: TowerField, Hal: ComputeLayer<F>, HostAllocatorType: ComputeAllocator<F, CpuMemory>, DeviceAllocatorType: ComputeAllocator<F, Hal::DevMem>,

Source§

fn n_vars(&self) -> usize

The number of variables remaining in the multivariate polynomial. Read more
Source§

fn evaluation_order(&self) -> EvaluationOrder

Sumcheck evaluation order assumed by this specific prover.
Source§

fn execute(&mut self, batch_coeff: F) -> Result<RoundCoeffs<F>, Error>

Computes the prover message for this round as a univariate polynomial. Read more
Source§

fn fold(&mut self, challenge: F) -> Result<(), Error>

Folds the sumcheck multilinears with a new verifier challenge.
Source§

fn finish(self: Box<Self>) -> Result<Vec<F>, Error>

Finishes the sumcheck proving protocol and returns the evaluations of all multilinears at the challenge point.

Auto Trait Implementations§

§

impl<'a, F, Hal, HostAllocatorType, DeviceAllocatorType> Freeze for BivariateMLEcheckProver<'a, F, Hal, HostAllocatorType, DeviceAllocatorType>
where <F as WithUnderlier>::Underlier: Sized, F: Freeze, <<Hal as ComputeLayer<F>>::DevMem as ComputeMemory<F>>::FSlice<'a>: Freeze, <<Hal as ComputeLayer<F>>::DevMem as ComputeMemory<F>>::FSliceMut<'a>: Freeze,

§

impl<'a, F, Hal, HostAllocatorType, DeviceAllocatorType> RefUnwindSafe for BivariateMLEcheckProver<'a, F, Hal, HostAllocatorType, DeviceAllocatorType>
where <F as WithUnderlier>::Underlier: Sized, F: RefUnwindSafe, Hal: RefUnwindSafe, DeviceAllocatorType: RefUnwindSafe, HostAllocatorType: RefUnwindSafe, <<Hal as ComputeLayer<F>>::DevMem as ComputeMemory<F>>::FSlice<'a>: RefUnwindSafe, <<Hal as ComputeLayer<F>>::DevMem as ComputeMemory<F>>::FSliceMut<'a>: RefUnwindSafe,

§

impl<'a, F, Hal, HostAllocatorType, DeviceAllocatorType> Send for BivariateMLEcheckProver<'a, F, Hal, HostAllocatorType, DeviceAllocatorType>
where <F as WithUnderlier>::Underlier: Sized, Hal: Sync, DeviceAllocatorType: Sync, HostAllocatorType: Sync,

§

impl<'a, F, Hal, HostAllocatorType, DeviceAllocatorType> Sync for BivariateMLEcheckProver<'a, F, Hal, HostAllocatorType, DeviceAllocatorType>
where <F as WithUnderlier>::Underlier: Sized, Hal: Sync, DeviceAllocatorType: Sync, HostAllocatorType: Sync, <<Hal as ComputeLayer<F>>::DevMem as ComputeMemory<F>>::FSliceMut<'a>: Sync,

§

impl<'a, F, Hal, HostAllocatorType, DeviceAllocatorType> Unpin for BivariateMLEcheckProver<'a, F, Hal, HostAllocatorType, DeviceAllocatorType>
where <F as WithUnderlier>::Underlier: Sized, F: Unpin, <<Hal as ComputeLayer<F>>::DevMem as ComputeMemory<F>>::FSlice<'a>: Unpin, <<Hal as ComputeLayer<F>>::DevMem as ComputeMemory<F>>::FSliceMut<'a>: Unpin,

§

impl<'a, F, Hal, HostAllocatorType, DeviceAllocatorType> UnwindSafe for BivariateMLEcheckProver<'a, F, Hal, HostAllocatorType, DeviceAllocatorType>
where <F as WithUnderlier>::Underlier: Sized, F: UnwindSafe, Hal: RefUnwindSafe, DeviceAllocatorType: RefUnwindSafe, HostAllocatorType: RefUnwindSafe, <<Hal as ComputeLayer<F>>::DevMem as ComputeMemory<F>>::FSlice<'a>: UnwindSafe, <<Hal as ComputeLayer<F>>::DevMem as ComputeMemory<F>>::FSliceMut<'a>: 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> 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
§

impl<T> ErasedDestructor for T
where T: 'static,