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

@@ -21,6 +21,10 @@ pub use lwe_ksk::*;
pub use lwe_to_glwe_ksk::*;
use poulpy_hal::layouts::{Backend, Module, Scratch};
pub trait PrepareScratchSpace<B: Backend, T> {
fn prepare_scratch_space(&self, module: &Module<B>, infos: &T) -> usize;
}
pub trait PrepareAlloc<B: Backend, T> {
fn prepare_alloc(&self, module: &Module<B>, scratch: &mut Scratch<B>) -> T;
}