Added PrepareScratchSpace trait

This commit is contained in:
Jean-Philippe Bossuat
2025-10-09 17:07:53 +02:00
parent 8eafcaff1f
commit 2884935a38
11 changed files with 114 additions and 16 deletions

View File

@@ -8,7 +8,7 @@ use crate::{
dist::Distribution,
layouts::{
Base2K, BuildError, Degree, GLWEInfos, GLWEPublicKey, LWEInfos, Rank, TorusPrecision,
prepared::{Prepare, PrepareAlloc},
prepared::{Prepare, PrepareAlloc, PrepareScratchSpace},
},
};
@@ -180,6 +180,12 @@ where
}
}
impl<DR: DataRef, B: Backend, A: GLWEInfos> PrepareScratchSpace<B, A> for GLWEPublicKeyPrepared<DR, B> {
fn prepare_scratch_space(&self, _module: &Module<B>, _infos: &A) -> usize {
0
}
}
impl<DM: DataMut, DR: DataRef, B: Backend> Prepare<B, GLWEPublicKey<DR>> for GLWEPublicKeyPrepared<DM, B>
where
Module<B>: VecZnxDftApply<B>,