pub struct CpuDevice<SC> {
pub config: Arc<SC>,
/* private fields */
}
Expand description
§Safety
See CpuBackend
.
Fields§
§config: Arc<SC>
Implementations§
Trait Implementations§
Source§impl<SC> DeviceDataTransporter<SC, CpuBackend<SC>> for CpuDevice<SC>where
SC: StarkGenericConfig,
impl<SC> DeviceDataTransporter<SC, CpuBackend<SC>> for CpuDevice<SC>where
SC: StarkGenericConfig,
Source§fn transport_pk_to_device(
&self,
mpk: &MultiStarkProvingKey<SC>,
) -> DeviceMultiStarkProvingKey<CpuBackend<SC>>
fn transport_pk_to_device( &self, mpk: &MultiStarkProvingKey<SC>, ) -> DeviceMultiStarkProvingKey<CpuBackend<SC>>
Transport the proving key to the device, filtering for only the provided
air_ids
.fn transport_matrix_to_device( &self, matrix: &Arc<RowMajorMatrix<Val<SC>>>, ) -> Arc<RowMajorMatrix<Val<SC>>> ⓘ
Source§fn transport_committed_trace_to_device(
&self,
commitment: Com<SC>,
trace: &Arc<RowMajorMatrix<Val<SC>>>,
prover_data: &Arc<PcsProverData<SC>>,
) -> CommittedTraceData<CpuBackend<SC>>
fn transport_committed_trace_to_device( &self, commitment: Com<SC>, trace: &Arc<RowMajorMatrix<Val<SC>>>, prover_data: &Arc<PcsProverData<SC>>, ) -> CommittedTraceData<CpuBackend<SC>>
The
commitment
and prover_data
are assumed to have been previously computed from the
trace
.Source§fn transport_matrix_from_device_to_host(
&self,
matrix: &Arc<RowMajorMatrix<Val<SC>>>,
) -> Arc<RowMajorMatrix<Val<SC>>> ⓘ
fn transport_matrix_from_device_to_host( &self, matrix: &Arc<RowMajorMatrix<Val<SC>>>, ) -> Arc<RowMajorMatrix<Val<SC>>> ⓘ
Transport a device matrix to host. This should only be used for testing / debugging
purposes.
Source§impl<SC: StarkGenericConfig> OpeningProver<CpuBackend<SC>> for CpuDevice<SC>
impl<SC: StarkGenericConfig> OpeningProver<CpuBackend<SC>> for CpuDevice<SC>
Source§impl<SC: StarkGenericConfig> QuotientCommitter<CpuBackend<SC>> for CpuDevice<SC>
impl<SC: StarkGenericConfig> QuotientCommitter<CpuBackend<SC>> for CpuDevice<SC>
Source§fn eval_and_commit_quotient(
&self,
challenger: &mut SC::Challenger,
pk_views: &[&DeviceStarkProvingKey<CpuBackend<SC>>],
public_values: &[Vec<Val<SC>>],
cached_pcs_datas_per_air: &[Vec<PcsData<SC>>],
common_main_pcs_data: &PcsData<SC>,
prover_data_after: &ProverDataAfterRapPhases<CpuBackend<SC>>,
) -> (Com<SC>, PcsData<SC>)
fn eval_and_commit_quotient( &self, challenger: &mut SC::Challenger, pk_views: &[&DeviceStarkProvingKey<CpuBackend<SC>>], public_values: &[Vec<Val<SC>>], cached_pcs_datas_per_air: &[Vec<PcsData<SC>>], common_main_pcs_data: &PcsData<SC>, prover_data_after: &ProverDataAfterRapPhases<CpuBackend<SC>>, ) -> (Com<SC>, PcsData<SC>)
Given a view of the PCS data from all phases of proving,
first get the trace polynomials evaluated on the quotient domains.
Then compute the quotient polynomial evaluated on the quotient domain
and commit to it. Read more
Source§impl<SC: StarkGenericConfig> RapPartialProver<CpuBackend<SC>> for CpuDevice<SC>
impl<SC: StarkGenericConfig> RapPartialProver<CpuBackend<SC>> for CpuDevice<SC>
Source§fn partially_prove(
&self,
challenger: &mut SC::Challenger,
mpk: &DeviceMultiStarkProvingKeyView<'_, CpuBackend<SC>>,
trace_views: Vec<AirView<Arc<RowMajorMatrix<Val<SC>>>, Val<SC>>>,
) -> (Option<RapPhaseSeqPartialProof<SC>>, ProverDataAfterRapPhases<CpuBackend<SC>>)
fn partially_prove( &self, challenger: &mut SC::Challenger, mpk: &DeviceMultiStarkProvingKeyView<'_, CpuBackend<SC>>, trace_views: Vec<AirView<Arc<RowMajorMatrix<Val<SC>>>, Val<SC>>>, ) -> (Option<RapPhaseSeqPartialProof<SC>>, ProverDataAfterRapPhases<CpuBackend<SC>>)
The
trace_views
are the respective (owned) trace matrices, evaluated on the trace domain.
Currently this function does not provide a view of any already committed data associated
with the trace views, although that data is available. Read moreSource§impl<SC: StarkGenericConfig> TraceCommitter<CpuBackend<SC>> for CpuDevice<SC>
impl<SC: StarkGenericConfig> TraceCommitter<CpuBackend<SC>> for CpuDevice<SC>
impl<SC: StarkGenericConfig> ProverDevice<CpuBackend<SC>> for CpuDevice<SC>
Auto Trait Implementations§
impl<SC> Freeze for CpuDevice<SC>
impl<SC> RefUnwindSafe for CpuDevice<SC>where
SC: RefUnwindSafe,
impl<SC> Send for CpuDevice<SC>
impl<SC> Sync for CpuDevice<SC>
impl<SC> Unpin for CpuDevice<SC>
impl<SC> UnwindSafe for CpuDevice<SC>where
SC: RefUnwindSafe,
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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