This commit is contained in:
Pro7ech
2025-10-15 10:48:14 +02:00
parent a5df85170d
commit 008b800c01
74 changed files with 890 additions and 871 deletions

View File

@@ -1,5 +1,5 @@
use itertools::Itertools;
use poulpy_core::layouts::prepared::GGSWCiphertextPreparedToRef;
use poulpy_core::layouts::prepared::GGSWPreparedToRef;
use poulpy_hal::layouts::{Backend, DataMut, DataRef, Module, Scratch};
use crate::tfhe::bdd_arithmetic::{
@@ -60,15 +60,11 @@ pub fn eval_bdd_2w_to_1w<R: DataMut, A: DataRef, B: DataRef, T: UnsignedInteger,
}
// Collects inputs into a single array
let inputs: Vec<&dyn GGSWCiphertextPreparedToRef<BE>> = a
let inputs: Vec<&dyn GGSWPreparedToRef<BE>> = a
.blocks
.iter()
.map(|x| x as &dyn GGSWCiphertextPreparedToRef<BE>)
.chain(
b.blocks
.iter()
.map(|x| x as &dyn GGSWCiphertextPreparedToRef<BE>),
)
.map(|x| x as &dyn GGSWPreparedToRef<BE>)
.chain(b.blocks.iter().map(|x| x as &dyn GGSWPreparedToRef<BE>))
.collect_vec();
// Evaluates out[i] = circuit[i](a, b)

View File

@@ -3,7 +3,7 @@ use poulpy_core::{
GLWEExternalProductInplace, GLWEOperations, TakeGLWESlice,
layouts::{
GLWE, GLWEToMut, LWEInfos,
prepared::{GGSWCiphertextPreparedToRef, GGSWPrepared},
prepared::{GGSWPrepared, GGSWPreparedToRef},
},
};
use poulpy_hal::{
@@ -39,7 +39,7 @@ where
&self,
module: &Module<BE>,
out: &mut [GLWE<O>],
inputs: &[&dyn GGSWCiphertextPreparedToRef<BE>],
inputs: &[&dyn GGSWPreparedToRef<BE>],
scratch: &mut Scratch<BE>,
) where
O: DataMut;
@@ -55,7 +55,7 @@ where
&self,
module: &Module<BE>,
out: &mut [GLWE<O>],
inputs: &[&dyn GGSWCiphertextPreparedToRef<BE>],
inputs: &[&dyn GGSWPreparedToRef<BE>],
scratch: &mut Scratch<BE>,
) where
O: DataMut,