mirror of
https://github.com/arnaucube/poulpy.git
synced 2026-02-10 13:16:44 +01:00
refactoring
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
use criterion::{criterion_group, criterion_main, BenchmarkId, Criterion};
|
||||
use math::modulus::WordOps;
|
||||
use math::poly::Poly;
|
||||
use math::ring::Ring;
|
||||
use rns::modulus::WordOps;
|
||||
use rns::poly::Poly;
|
||||
use rns::ring::Ring;
|
||||
|
||||
fn ntt(c: &mut Criterion) {
|
||||
fn runner<'a, const INPLACE: bool, const LAZY: bool>(
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
use criterion::{criterion_group, criterion_main, BenchmarkId, Criterion};
|
||||
use math::modulus::montgomery::Montgomery;
|
||||
use math::modulus::{WordOps, ONCE};
|
||||
use math::poly::Poly;
|
||||
use math::ring::Ring;
|
||||
use rns::modulus::montgomery::Montgomery;
|
||||
use rns::modulus::{WordOps, ONCE};
|
||||
use rns::poly::Poly;
|
||||
use rns::ring::Ring;
|
||||
|
||||
fn a_add_b_into_b(c: &mut Criterion) {
|
||||
fn runner(ring: Ring<u64>) -> Box<dyn FnMut()> {
|
||||
|
||||
@@ -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))
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
use criterion::{criterion_group, criterion_main, Criterion};
|
||||
use math::poly::PolyRNS;
|
||||
use math::ring::RingRNS;
|
||||
use rns::poly::PolyRNS;
|
||||
use rns::ring::RingRNS;
|
||||
use sampling::source::Source;
|
||||
|
||||
fn fill_uniform(c: &mut Criterion) {
|
||||
|
||||
Reference in New Issue
Block a user