pub struct SqrtEqLayers {
pub low: EqEvalLayers<EF>,
pub high: EqEvalLayers<EF>,
}Expand description
Square-root decomposition using pre-computed eq evaluation layers.
Instead of folding columns on GPU, we pre-compute all layers of eq evaluations and simply drop the highest layer each round (no GPU work needed).
Fields§
§low: EqEvalLayers<EF>Layers for xi[(n + 1) / 2..]. Layers insert xi_i from the front, so low contains the
latter half of xi.
high: EqEvalLayers<EF>Layers for xi[..(n + 1) / 2].
Layers: [ eq(xi[j..(n+1)/2], ..) ] for j = (0..(n+1)/2).rev()
Implementations§
Source§impl SqrtEqLayers
impl SqrtEqLayers
Sourcepub fn from_xi(
xi: &[EF],
device_ctx: &GpuDeviceCtx,
) -> Result<Self, KernelError>
pub fn from_xi( xi: &[EF], device_ctx: &GpuDeviceCtx, ) -> Result<Self, KernelError>
Build layers from xi values.
This is meant to match behavior of SqrtHyperBuffer::from_xi but with layers.
Example: This means [a,b,c,d] should be sent to low: [[d], [d, c]], high: [[b], [b, a]].
pub fn max_n(&self) -> usize
pub fn low_n(&self) -> usize
pub fn high_n(&self) -> usize
Sourcepub fn drop_layer(&mut self)
pub fn drop_layer(&mut self)
Drop the highest layer. Drops from high first, then low. This corresponding to pop_front
from xi.
Auto Trait Implementations§
impl Freeze for SqrtEqLayers
impl RefUnwindSafe for SqrtEqLayers
impl Send for SqrtEqLayers
impl Sync for SqrtEqLayers
impl Unpin for SqrtEqLayers
impl UnsafeUnpin for SqrtEqLayers
impl UnwindSafe for SqrtEqLayers
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