pub struct CpuLayer<F>(/* private fields */);
Trait Implementations§
Source§impl<F: TowerTop> ComputeHolder<F, CpuLayer<F>> for CpuLayerHolder<F>
impl<F: TowerTop> ComputeHolder<F, CpuLayer<F>> for CpuLayerHolder<F>
type HostComputeAllocator<'a> = BumpAllocator<'a, F, CpuMemory>
type DeviceComputeAllocator<'a> = BumpAllocator<'a, F, <CpuLayer<F> as ComputeLayer<F>>::DevMem>
fn to_data<'a, 'b>(
&'a mut self,
) -> ComputeData<'a, F, CpuLayer<F>, Self::HostComputeAllocator<'b>, Self::DeviceComputeAllocator<'b>>where
'a: 'b,
Source§impl<F: TowerTop> ComputeLayer<F> for CpuLayer<F>
impl<F: TowerTop> ComputeLayer<F> for CpuLayer<F>
Source§type Exec<'a> = CpuLayerExecutor<F>
type Exec<'a> = CpuLayerExecutor<F>
The executor that can execute operations on the device.
Source§fn copy_h2d(
&self,
src: &[F],
dst: &mut FSliceMut<'_, F, Self>,
) -> Result<(), Error>
fn copy_h2d( &self, src: &[F], dst: &mut FSliceMut<'_, F, Self>, ) -> Result<(), Error>
Copy data from the host to the device. Read more
Source§fn copy_d2h(&self, src: FSlice<'_, F, Self>, dst: &mut [F]) -> Result<(), Error>
fn copy_d2h(&self, src: FSlice<'_, F, Self>, dst: &mut [F]) -> Result<(), Error>
Copy data from the device to the host. Read more
Source§fn copy_d2d(
&self,
src: FSlice<'_, F, Self>,
dst: &mut FSliceMut<'_, F, Self>,
) -> Result<(), Error>
fn copy_d2d( &self, src: FSlice<'_, F, Self>, dst: &mut FSliceMut<'_, F, 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<F>, Error>,
) -> Result<Vec<F>, Error>where
'b: 'a,
fn execute<'a, 'b>(
&'b self,
f: impl FnOnce(&mut Self::Exec<'a>) -> Result<Vec<F>, Error>,
) -> Result<Vec<F>, Error>where
'b: 'a,
Executes an operation. Read more
Source§fn compile_expr(
&self,
expr: &ArithCircuit<F>,
) -> Result<<Self::Exec<'_> as ComputeLayerExecutor<F>>::ExprEval, Error>
fn compile_expr( &self, expr: &ArithCircuit<F>, ) -> Result<<Self::Exec<'_> as ComputeLayerExecutor<F>>::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>where
F: Send,
impl<F> Sync for CpuLayer<F>where
F: Sync,
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