Code organisation for glwe

This commit is contained in:
Jean-Philippe Bossuat
2025-06-12 15:46:05 +02:00
parent ec4253bb1c
commit 989ea077a9
30 changed files with 1305 additions and 1229 deletions

View File

@@ -1,6 +1,6 @@
use backend::{Backend, Module, ZnxInfos};
use crate::GLWECiphertextFourier;
use crate::{FourierGLWECiphertext, div_ceil};
pub trait Infos {
type Inner: ZnxInfos;
@@ -56,13 +56,13 @@ pub trait SetMetaData {
}
pub trait GetRow<B: Backend> {
fn get_row<R>(&self, module: &Module<B>, row_i: usize, col_j: usize, res: &mut GLWECiphertextFourier<R, B>)
fn get_row<R>(&self, module: &Module<B>, row_i: usize, col_j: usize, res: &mut FourierGLWECiphertext<R, B>)
where
R: AsMut<[u8]> + AsRef<[u8]>;
}
pub trait SetRow<B: Backend> {
fn set_row<R>(&mut self, module: &Module<B>, row_i: usize, col_j: usize, a: &GLWECiphertextFourier<R, B>)
fn set_row<R>(&mut self, module: &Module<B>, row_i: usize, col_j: usize, a: &FourierGLWECiphertext<R, B>)
where
R: AsRef<[u8]>;
}