pub trait GLWEPacking<BE: Backend> {
// Required methods
fn glwe_pack_galois_elements(&self) -> Vec<i64>;
fn glwe_pack_tmp_bytes<R, K>(&self, res: &R, key: &K) -> usize
where R: GLWEInfos,
K: GGLWEInfos;
fn glwe_pack<R, A, K, H>(
&self,
res: &mut R,
a: HashMap<usize, &mut A>,
log_gap_out: usize,
keys: &H,
scratch: &mut Scratch<BE>,
)
where R: GLWEToMut + GLWEInfos,
A: GLWEToMut + GLWEInfos,
K: GGLWEPreparedToRef<BE> + GetGaloisElement + GGLWEInfos,
H: GLWEAutomorphismKeyHelper<K, BE>;
}Required Methods§
fn glwe_pack_galois_elements(&self) -> Vec<i64>
fn glwe_pack_tmp_bytes<R, K>(&self, res: &R, key: &K) -> usizewhere
R: GLWEInfos,
K: GGLWEInfos,
Sourcefn glwe_pack<R, A, K, H>(
&self,
res: &mut R,
a: HashMap<usize, &mut A>,
log_gap_out: usize,
keys: &H,
scratch: &mut Scratch<BE>,
)where
R: GLWEToMut + GLWEInfos,
A: GLWEToMut + GLWEInfos,
K: GGLWEPreparedToRef<BE> + GetGaloisElement + GGLWEInfos,
H: GLWEAutomorphismKeyHelper<K, BE>,
fn glwe_pack<R, A, K, H>(
&self,
res: &mut R,
a: HashMap<usize, &mut A>,
log_gap_out: usize,
keys: &H,
scratch: &mut Scratch<BE>,
)where
R: GLWEToMut + GLWEInfos,
A: GLWEToMut + GLWEInfos,
K: GGLWEPreparedToRef<BE> + GetGaloisElement + GGLWEInfos,
H: GLWEAutomorphismKeyHelper<K, BE>,
Packs [x_0: GLWE(m_0), x_1: GLWE(m_1), …, x_i: GLWE(m_i)] to [0: GLWE(m_0 * X^x_0 + m_1 * X^x_1 + … + m_i * X^x_i)]
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.
Implementations on Foreign Types§
Source§impl<BE: Backend> GLWEPacking<BE> for Module<BE>where
Self: GLWEAutomorphism<BE> + GaloisElement + ModuleLogN + GLWERotate<BE> + GLWESub + GLWEShift<BE> + GLWEAdd + GLWENormalize<BE> + GLWECopy + GLWETrace<BE>,
Scratch<BE>: ScratchTakeCore<BE>,
impl<BE: Backend> GLWEPacking<BE> for Module<BE>where
Self: GLWEAutomorphism<BE> + GaloisElement + ModuleLogN + GLWERotate<BE> + GLWESub + GLWEShift<BE> + GLWEAdd + GLWENormalize<BE> + GLWECopy + GLWETrace<BE>,
Scratch<BE>: ScratchTakeCore<BE>,
Source§fn glwe_pack<R, A, K, H>(
&self,
res: &mut R,
a: HashMap<usize, &mut A>,
log_gap_out: usize,
keys: &H,
scratch: &mut Scratch<BE>,
)where
R: GLWEToMut + GLWEInfos,
A: GLWEToMut + GLWEInfos,
K: GGLWEPreparedToRef<BE> + GetGaloisElement + GGLWEInfos,
H: GLWEAutomorphismKeyHelper<K, BE>,
fn glwe_pack<R, A, K, H>(
&self,
res: &mut R,
a: HashMap<usize, &mut A>,
log_gap_out: usize,
keys: &H,
scratch: &mut Scratch<BE>,
)where
R: GLWEToMut + GLWEInfos,
A: GLWEToMut + GLWEInfos,
K: GGLWEPreparedToRef<BE> + GetGaloisElement + GGLWEInfos,
H: GLWEAutomorphismKeyHelper<K, BE>,
Packs [x_0: GLWE(m_0), x_1: GLWE(m_1), …, x_i: GLWE(m_i)] to [0: GLWE(m_0 * X^x_0 + m_1 * X^x_1 + … + m_i * X^x_i)]