Traits reduction, file + structs renaming

This commit is contained in:
Pro7ech
2025-10-21 10:17:52 +02:00
parent 77b49ea530
commit db3b20b8f6
106 changed files with 1026 additions and 1108 deletions

View File

@@ -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(),