pub struct EqEvalLayers<F> {
pub layers: Vec<Arc<DeviceBuffer<F>>>,
}Expand description
Same as EqEvalSegments but keeping segment tree with buffers separated by layer to allow dropping layers.
Fields§
§layers: Vec<Arc<DeviceBuffer<F>>>Layers are reference counted so the length-1 seed layer can be shared across trees.
Implementations§
Source§impl<F> EqEvalLayers<F>
impl<F> EqEvalLayers<F>
Source§impl EqEvalLayers<EF>
impl EqEvalLayers<EF>
Sourcepub fn new_rev<'a>(
n: usize,
x: impl IntoIterator<Item = &'a EF>,
device_ctx: &GpuDeviceCtx,
) -> Result<Self, KernelError>
pub fn new_rev<'a>( n: usize, x: impl IntoIterator<Item = &'a EF>, device_ctx: &GpuDeviceCtx, ) -> Result<Self, KernelError>
Creates a new EqEvalLayers instance with layers.len() = x.len() + 1.
Inserts x_i from the front for each layer.
Sourcepub fn new<'a>(
n: usize,
x: impl IntoIterator<Item = &'a EF>,
device_ctx: &GpuDeviceCtx,
) -> Result<Self, KernelError>
pub fn new<'a>( n: usize, x: impl IntoIterator<Item = &'a EF>, device_ctx: &GpuDeviceCtx, ) -> Result<Self, KernelError>
Creates a new EqEvalLayers instance with layers.len() = x.len() + 1.
Inserts x_i from the back for each layer. This matches behavior of
EqEvalSegments::new.
Auto Trait Implementations§
impl<F> Freeze for EqEvalLayers<F>
impl<F> RefUnwindSafe for EqEvalLayers<F>where
F: RefUnwindSafe,
impl<F> Send for EqEvalLayers<F>
impl<F> Sync for EqEvalLayers<F>
impl<F> Unpin for EqEvalLayers<F>
impl<F> UnsafeUnpin for EqEvalLayers<F>
impl<F> UnwindSafe for EqEvalLayers<F>where
F: 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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
§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