gadget product working

This commit is contained in:
Jean-Philippe Bossuat
2025-02-12 09:19:22 +01:00
parent 1f52a3d266
commit c5da752536
8 changed files with 56 additions and 33 deletions

View File

@@ -25,7 +25,7 @@ fn main() {
s.fill_ternary_prob(0.5, &mut source);
// Buffer to store s in the DFT domain
let mut s_ppol: SvpPPol = module.svp_new_ppol();
let mut s_ppol: SvpPPol = module.new_svp_ppol();
// s_ppol <- DFT(s)
module.svp_prepare(&mut s_ppol, &s);

View File

@@ -80,7 +80,7 @@ impl SvpPPol {
pub trait SvpPPolOps {
/// Allocates a new [SvpPPol].
fn svp_new_ppol(&self) -> SvpPPol;
fn new_svp_ppol(&self) -> SvpPPol;
/// Returns the minimum number of bytes necessary to allocate
/// a new [SvpPPol] through [SvpPPol::from_bytes].
@@ -95,7 +95,7 @@ pub trait SvpPPolOps {
}
impl SvpPPolOps for Module {
fn svp_new_ppol(&self) -> SvpPPol {
fn new_svp_ppol(&self) -> SvpPPol {
unsafe { SvpPPol(svp::new_svp_ppol(self.0), self.n()) }
}