Struct BivariateSumcheckProver

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

Sumcheck 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, 'b, F, Hal, DeviceAllocatorType, HostAllocatorType> BivariateSumcheckProver<'a, 'b, F, Hal, DeviceAllocatorType, HostAllocatorType>
where F: TowerField, Hal: ComputeLayer<F>, DeviceAllocatorType: ComputeAllocator<F, Hal::DevMem>, HostAllocatorType: ComputeAllocator<F, CpuMemory>,

Source

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

Source

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

Returns the amount of host memory this sumcheck requires.

Source

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

Returns the amount of device memory this sumcheck requires.

Trait Implementations§

Source§

impl<'a, 'b, F, Hal, DeviceAllocatorType, HostAllocatorType> SumcheckProver<F> for BivariateSumcheckProver<'a, 'b, F, Hal, DeviceAllocatorType, HostAllocatorType>
where F: TowerField, Hal: ComputeLayer<F>, DeviceAllocatorType: ComputeAllocator<F, Hal::DevMem>, HostAllocatorType: ComputeAllocator<F, CpuMemory>,

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, 'b, F, Hal, DeviceAllocatorType, HostAllocatorType> Freeze for BivariateSumcheckProver<'a, 'b, F, Hal, DeviceAllocatorType, HostAllocatorType>
where <F as WithUnderlier>::Underlier: Sized, F: Freeze,

§

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

§

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

§

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

§

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

§

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