mirror of
https://github.com/arnaucube/poulpy.git
synced 2026-02-10 13:16:44 +01:00
Traits reduction, file + structs renaming
This commit is contained in:
@@ -8,8 +8,7 @@ use poulpy_hal::{
|
||||
use crate::{
|
||||
GLWEAutomorphism, GLWECopy, GLWEShift, ScratchTakeCore,
|
||||
layouts::{
|
||||
Base2K, GGLWEInfos, GGLWEPreparedToRef, GLWE, GLWEInfos, GLWELayout, GLWEToMut, GLWEToRef, LWEInfos,
|
||||
prepared::GetAutomorphismGaloisElement,
|
||||
Base2K, GGLWEInfos, GGLWEPreparedToRef, GLWE, GLWEInfos, GLWELayout, GLWEToMut, GLWEToRef, GetGaloisElement, LWEInfos,
|
||||
},
|
||||
};
|
||||
|
||||
@@ -43,7 +42,7 @@ impl<D: DataMut> GLWE<D> {
|
||||
scratch: &mut Scratch<BE>,
|
||||
) where
|
||||
A: GLWEToRef,
|
||||
K: GGLWEPreparedToRef<BE> + GetAutomorphismGaloisElement + GGLWEInfos,
|
||||
K: GGLWEPreparedToRef<BE> + GetGaloisElement + GGLWEInfos,
|
||||
Scratch<BE>: ScratchTakeCore<BE>,
|
||||
M: GLWETrace<BE>,
|
||||
{
|
||||
@@ -58,7 +57,7 @@ impl<D: DataMut> GLWE<D> {
|
||||
keys: &HashMap<i64, K>,
|
||||
scratch: &mut Scratch<BE>,
|
||||
) where
|
||||
K: GGLWEPreparedToRef<BE> + GetAutomorphismGaloisElement + GGLWEInfos,
|
||||
K: GGLWEPreparedToRef<BE> + GetGaloisElement + GGLWEInfos,
|
||||
Scratch<BE>: ScratchTakeCore<BE>,
|
||||
M: GLWETrace<BE>,
|
||||
{
|
||||
@@ -110,7 +109,7 @@ where
|
||||
where
|
||||
R: GLWEToMut,
|
||||
A: GLWEToRef,
|
||||
K: GGLWEPreparedToRef<BE> + GetAutomorphismGaloisElement + GGLWEInfos,
|
||||
K: GGLWEPreparedToRef<BE> + GetGaloisElement + GGLWEInfos,
|
||||
Scratch<BE>: ScratchTakeCore<BE>,
|
||||
{
|
||||
self.glwe_copy(res, a);
|
||||
@@ -120,7 +119,7 @@ where
|
||||
fn glwe_trace_inplace<R, K>(&self, res: &mut R, start: usize, end: usize, keys: &HashMap<i64, K>, scratch: &mut Scratch<BE>)
|
||||
where
|
||||
R: GLWEToMut,
|
||||
K: GGLWEPreparedToRef<BE> + GetAutomorphismGaloisElement + GGLWEInfos,
|
||||
K: GGLWEPreparedToRef<BE> + GetGaloisElement + GGLWEInfos,
|
||||
Scratch<BE>: ScratchTakeCore<BE>,
|
||||
{
|
||||
let res: &mut GLWE<&mut [u8]> = &mut res.to_mut();
|
||||
@@ -141,7 +140,7 @@ where
|
||||
}
|
||||
|
||||
if res.base2k() != basek_ksk {
|
||||
let (mut self_conv, scratch_1) = scratch.take_glwe_ct(
|
||||
let (mut self_conv, scratch_1) = scratch.take_glwe(
|
||||
self,
|
||||
&GLWELayout {
|
||||
n: self.n().into(),
|
||||
|
||||
Reference in New Issue
Block a user