pub struct GLWETensorKey<D: Data>(/* private fields */);Expand description
GLWE tensor key used for relinearisation after a tensor product.
Wraps a GGLWE whose rank_in equals the number of unique
pairs max(1, rank*(rank+1)/2) produced by the tensor product.
D: Data is the backing storage type (e.g. Vec<u8>, &[u8],
&mut [u8]).
Implementations§
Source§impl GLWETensorKey<Vec<u8>>
impl GLWETensorKey<Vec<u8>>
Sourcepub fn bytes_of_from_infos<A>(infos: &A) -> usizewhere
A: GGLWEInfos,
pub fn bytes_of_from_infos<A>(infos: &A) -> usizewhere
A: GGLWEInfos,
Returns the byte count required for a GLWETensorKey with the given parameters.
Sourcepub fn bytes_of(
n: Degree,
base2k: Base2K,
k: TorusPrecision,
rank: Rank,
dnum: Dnum,
dsize: Dsize,
) -> usize
pub fn bytes_of( n: Degree, base2k: Base2K, k: TorusPrecision, rank: Rank, dnum: Dnum, dsize: Dsize, ) -> usize
Returns the byte count required for a GLWETensorKey with the given parameters.
Trait Implementations§
Source§impl<D: Clone + Data> Clone for GLWETensorKey<D>
impl<D: Clone + Data> Clone for GLWETensorKey<D>
Source§fn clone(&self) -> GLWETensorKey<D>
fn clone(&self) -> GLWETensorKey<D>
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<D: HostDataRef> Debug for GLWETensorKey<D>
impl<D: HostDataRef> Debug for GLWETensorKey<D>
Source§impl<D: HostDataRef> Display for GLWETensorKey<D>
impl<D: HostDataRef> Display for GLWETensorKey<D>
Source§impl<D: HostDataMut> FillUniform for GLWETensorKey<D>
impl<D: HostDataMut> FillUniform for GLWETensorKey<D>
Source§impl<BE: Backend> GGLWEAtViewMut<BE> for GLWETensorKey<BE::OwnedBuf>
impl<BE: Backend> GGLWEAtViewMut<BE> for GLWETensorKey<BE::OwnedBuf>
fn at_view_mut(&mut self, row: usize, col: usize) -> GLWEViewMut<'_, BE>
Source§impl<BE: Backend> GGLWEAtViewRef<BE> for GLWETensorKey<BE::OwnedBuf>
impl<BE: Backend> GGLWEAtViewRef<BE> for GLWETensorKey<BE::OwnedBuf>
Source§impl<D: Data> GGLWEInfos for GLWETensorKey<D>
impl<D: Data> GGLWEInfos for GLWETensorKey<D>
Source§impl<BE: Backend, D: Data> GGLWEToBackendMut<BE> for GLWETensorKey<D>where
GGLWE<D>: GGLWEToBackendMut<BE>,
impl<BE: Backend, D: Data> GGLWEToBackendMut<BE> for GLWETensorKey<D>where
GGLWE<D>: GGLWEToBackendMut<BE>,
fn to_backend_mut(&mut self) -> GGLWEBackendMut<'_, BE>
Source§impl<BE: Backend, D: Data> GGLWEToBackendRef<BE> for GLWETensorKey<D>where
GGLWE<D>: GGLWEToBackendRef<BE>,
impl<BE: Backend, D: Data> GGLWEToBackendRef<BE> for GLWETensorKey<D>where
GGLWE<D>: GGLWEToBackendRef<BE>,
fn to_backend_ref(&self) -> GGLWEBackendRef<'_, BE>
Source§impl<D: Data> GLWEInfos for GLWETensorKey<D>
impl<D: Data> GLWEInfos for GLWETensorKey<D>
Source§fn glwe_layout(&self) -> GLWELayout
fn glwe_layout(&self) -> GLWELayout
Returns a plain-data
GLWELayout snapshot of the current parameters.Source§impl<D: Data> LWEInfos for GLWETensorKey<D>
impl<D: Data> LWEInfos for GLWETensorKey<D>
Source§fn n(&self) -> Degree
fn n(&self) -> Degree
Returns the LWE dimension, i.e. the number of mask elements (= GLWE ring degree N).
Source§fn base2k(&self) -> Base2K
fn base2k(&self) -> Base2K
Returns the base-2-log of the limb width used for the RNS/CRT representation.
Source§fn max_k(&self) -> TorusPrecision
fn max_k(&self) -> TorusPrecision
Returns the maximum torus precision representable with the current limb decomposition.
Source§fn lwe_layout(&self) -> LWELayout
fn lwe_layout(&self) -> LWELayout
Returns a plain-data
LWELayout snapshot of the current parameters.Source§impl<D: PartialEq + Data> PartialEq for GLWETensorKey<D>
impl<D: PartialEq + Data> PartialEq for GLWETensorKey<D>
Source§fn eq(&self, other: &GLWETensorKey<D>) -> bool
fn eq(&self, other: &GLWETensorKey<D>) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl<D: HostDataMut> ReaderFrom for GLWETensorKey<D>
impl<D: HostDataMut> ReaderFrom for GLWETensorKey<D>
Source§impl<D: HostDataRef> WriterTo for GLWETensorKey<D>
impl<D: HostDataRef> WriterTo for GLWETensorKey<D>
impl<D: Eq + Data> Eq for GLWETensorKey<D>
impl<D: Data> StructuralPartialEq for GLWETensorKey<D>
Auto Trait Implementations§
impl<D> Freeze for GLWETensorKey<D>where
D: Freeze,
impl<D> RefUnwindSafe for GLWETensorKey<D>where
D: RefUnwindSafe,
impl<D> Send for GLWETensorKey<D>where
D: Send,
impl<D> Sync for GLWETensorKey<D>where
D: Sync,
impl<D> Unpin for GLWETensorKey<D>where
D: Unpin,
impl<D> UnsafeUnpin for GLWETensorKey<D>where
D: UnsafeUnpin,
impl<D> UnwindSafe for GLWETensorKey<D>where
D: 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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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