pub struct CpuLayer<F: TowerFamily>(/* private fields */);
Trait Implementations§
Source§impl<T: TowerFamily> ComputeLayer<<T as TowerFamily>::B128> for CpuLayer<T>
impl<T: TowerFamily> ComputeLayer<<T as TowerFamily>::B128> for CpuLayer<T>
Source§type Exec<'a> = CpuLayerExecutor<T>
type Exec<'a> = CpuLayerExecutor<T>
The executor that can execute operations on the device.
Source§fn host_alloc(&self, n: usize) -> impl AsMut<[T::B128]> + '_
fn host_alloc(&self, n: usize) -> impl AsMut<[T::B128]> + '_
Allocates a slice of memory on the host that is prepared for transfers to/from the device. Read more
Source§fn copy_h2d(
&self,
src: &[T::B128],
dst: &mut FSliceMut<'_, T::B128, Self>,
) -> Result<(), Error>
fn copy_h2d( &self, src: &[T::B128], dst: &mut FSliceMut<'_, T::B128, Self>, ) -> Result<(), Error>
Copy data from the host to the device. Read more
Source§fn copy_d2h(
&self,
src: FSlice<'_, T::B128, Self>,
dst: &mut [T::B128],
) -> Result<(), Error>
fn copy_d2h( &self, src: FSlice<'_, T::B128, Self>, dst: &mut [T::B128], ) -> Result<(), Error>
Copy data from the device to the host. Read more
Source§fn copy_d2d(
&self,
src: FSlice<'_, T::B128, Self>,
dst: &mut FSliceMut<'_, T::B128, Self>,
) -> Result<(), Error>
fn copy_d2d( &self, src: FSlice<'_, T::B128, Self>, dst: &mut FSliceMut<'_, T::B128, Self>, ) -> Result<(), Error>
Copy data between disjoint device buffers. Read more
Source§fn execute<'a, 'b>(
&'b self,
f: impl FnOnce(&mut Self::Exec<'a>) -> Result<Vec<T::B128>, Error>,
) -> Result<Vec<T::B128>, Error>where
'b: 'a,
fn execute<'a, 'b>(
&'b self,
f: impl FnOnce(&mut Self::Exec<'a>) -> Result<Vec<T::B128>, Error>,
) -> Result<Vec<T::B128>, Error>where
'b: 'a,
Executes an operation. Read more
Source§fn compile_expr(
&self,
expr: &ArithCircuit<T::B128>,
) -> Result<<Self::Exec<'_> as ComputeLayerExecutor<T::B128>>::ExprEval, Error>
fn compile_expr( &self, expr: &ArithCircuit<T::B128>, ) -> Result<<Self::Exec<'_> as ComputeLayerExecutor<T::B128>>::ExprEval, Error>
Compiles an arithmetic expression to the evaluator.
Auto Trait Implementations§
impl<F> Freeze for CpuLayer<F>
impl<F> RefUnwindSafe for CpuLayer<F>where
F: RefUnwindSafe,
impl<F> Send for CpuLayer<F>
impl<F> Sync for CpuLayer<F>
impl<F> Unpin for CpuLayer<F>where
F: Unpin,
impl<F> UnwindSafe for CpuLayer<F>where
F: UnwindSafe,
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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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