pub struct FastCpuLayer<T: TowerFamily, P: PackedTop<T>> { /* private fields */ }
Expand description
Optimized CPU implementation of the compute layer.
Trait Implementations§
Source§impl<T: TowerFamily, P: PackedTop<T>> ComputeLayer<<T as TowerFamily>::B128> for FastCpuLayer<T, P>
impl<T: TowerFamily, P: PackedTop<T>> ComputeLayer<<T as TowerFamily>::B128> for FastCpuLayer<T, P>
Source§type Exec<'b> = FastCpuExecutor<'b, T, P>
type Exec<'b> = FastCpuExecutor<'b, T, P>
The executor that can execute operations on the device.
Source§type DevMem = PackedMemory<P>
type DevMem = PackedMemory<P>
The device memory.
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 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.
Source§impl<T: Debug + TowerFamily, P: Debug + PackedTop<T>> Debug for FastCpuLayer<T, P>
impl<T: Debug + TowerFamily, P: Debug + PackedTop<T>> Debug for FastCpuLayer<T, P>
Source§impl<T: TowerFamily, P: PackedTop<T>> Default for FastCpuLayer<T, P>
impl<T: TowerFamily, P: PackedTop<T>> Default for FastCpuLayer<T, P>
Auto Trait Implementations§
impl<T, P> !Freeze for FastCpuLayer<T, P>
impl<T, P> RefUnwindSafe for FastCpuLayer<T, P>where
<T as TowerFamily>::B128: Sized,
<<T as TowerFamily>::B128 as WithUnderlier>::Underlier: Sized,
P: RefUnwindSafe,
T: RefUnwindSafe,
impl<T, P> Send for FastCpuLayer<T, P>where
<T as TowerFamily>::B128: Sized,
<<T as TowerFamily>::B128 as WithUnderlier>::Underlier: Sized,
impl<T, P> Sync for FastCpuLayer<T, P>where
<T as TowerFamily>::B128: Sized,
<<T as TowerFamily>::B128 as WithUnderlier>::Underlier: Sized,
impl<T, P> Unpin for FastCpuLayer<T, P>where
<T as TowerFamily>::B128: Sized,
<<T as TowerFamily>::B128 as WithUnderlier>::Underlier: Sized,
P: Unpin,
T: Unpin,
impl<T, P> UnwindSafe for FastCpuLayer<T, P>where
<T as TowerFamily>::B128: Sized,
<<T as TowerFamily>::B128 as WithUnderlier>::Underlier: Sized,
P: UnwindSafe,
T: 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