refactoring

This commit is contained in:
Jean-Philippe Bossuat
2025-01-27 16:23:23 +01:00
parent c30f598776
commit 1ac719ce7e
21 changed files with 113 additions and 88 deletions

View File

@@ -1,11 +1,11 @@
use criterion::{criterion_group, criterion_main, Criterion};
use math::poly::PolyRNS;
use math::ring::RingRNS;
use rns::poly::PolyRNS;
use rns::ring::RingRNS;
fn div_floor_by_last_modulus_ntt_true(c: &mut Criterion) {
fn runner(r: RingRNS<u64>) -> Box<dyn FnMut()> {
let a: PolyRNS<u64> = r.new_polyrns();
let mut b: [math::poly::Poly<u64>; 2] = [r.new_poly(), r.new_poly()];
let mut b: [rns::poly::Poly<u64>; 2] = [r.new_poly(), r.new_poly()];
let mut c: PolyRNS<u64> = r.new_polyrns();
Box::new(move || r.div_by_last_modulus::<false, true>(&a, &mut b, &mut c))