mirror of
https://github.com/arnaucube/poulpy.git
synced 2026-02-10 13:16:44 +01:00
compiling CBT but failing tests
This commit is contained in:
@@ -8,7 +8,7 @@ use crate::{
|
||||
automorphism::glwe_ct::GLWEAutomorphism,
|
||||
layouts::{
|
||||
GGLWEInfos, GGLWEPreparedToRef, GGSW, GGSWInfos, GGSWToMut, GGSWToRef, GetGaloisElement,
|
||||
prepared::{TensorKeyPrepared, TensorKeyPreparedToRef},
|
||||
prepared::{GLWETensorKeyPrepared, GLWETensorKeyPreparedToRef},
|
||||
},
|
||||
};
|
||||
|
||||
@@ -36,7 +36,7 @@ impl<D: DataMut> GGSW<D> {
|
||||
where
|
||||
A: GGSWToRef,
|
||||
K: GetGaloisElement + GGLWEPreparedToRef<BE> + GGLWEInfos,
|
||||
T: TensorKeyPreparedToRef<BE>,
|
||||
T: GLWETensorKeyPreparedToRef<BE>,
|
||||
Scratch<BE>: ScratchTakeCore<BE>,
|
||||
M: GGSWAutomorphism<BE>,
|
||||
{
|
||||
@@ -46,7 +46,7 @@ impl<D: DataMut> GGSW<D> {
|
||||
pub fn automorphism_inplace<K, T, M, BE: Backend>(&mut self, module: &M, key: &K, tsk: &T, scratch: &mut Scratch<BE>)
|
||||
where
|
||||
K: GetGaloisElement + GGLWEPreparedToRef<BE> + GGLWEInfos,
|
||||
T: TensorKeyPreparedToRef<BE>,
|
||||
T: GLWETensorKeyPreparedToRef<BE>,
|
||||
Scratch<BE>: ScratchTakeCore<BE>,
|
||||
M: GGSWAutomorphism<BE>,
|
||||
{
|
||||
@@ -79,12 +79,12 @@ where
|
||||
R: GGSWToMut,
|
||||
A: GGSWToRef,
|
||||
K: GetGaloisElement + GGLWEPreparedToRef<BE> + GGLWEInfos,
|
||||
T: TensorKeyPreparedToRef<BE>,
|
||||
T: GLWETensorKeyPreparedToRef<BE>,
|
||||
Scratch<BE>: ScratchTakeCore<BE>,
|
||||
{
|
||||
let res: &mut GGSW<&mut [u8]> = &mut res.to_mut();
|
||||
let a: &GGSW<&[u8]> = &a.to_ref();
|
||||
let tsk: &TensorKeyPrepared<&[u8], BE> = &tsk.to_ref();
|
||||
let tsk: &GLWETensorKeyPrepared<&[u8], BE> = &tsk.to_ref();
|
||||
|
||||
assert_eq!(res.dsize(), a.dsize());
|
||||
assert!(res.dnum() <= a.dnum());
|
||||
@@ -104,11 +104,11 @@ where
|
||||
where
|
||||
R: GGSWToMut,
|
||||
K: GetGaloisElement + GGLWEPreparedToRef<BE> + GGLWEInfos,
|
||||
T: TensorKeyPreparedToRef<BE>,
|
||||
T: GLWETensorKeyPreparedToRef<BE>,
|
||||
Scratch<BE>: ScratchTakeCore<BE>,
|
||||
{
|
||||
let res: &mut GGSW<&mut [u8]> = &mut res.to_mut();
|
||||
let tsk: &TensorKeyPrepared<&[u8], BE> = &tsk.to_ref();
|
||||
let tsk: &GLWETensorKeyPrepared<&[u8], BE> = &tsk.to_ref();
|
||||
|
||||
// Keyswitch the j-th row of the col 0
|
||||
for row in 0..res.dnum().as_usize() {
|
||||
|
||||
Reference in New Issue
Block a user