arnaucube
arnaucube/phantom-zonePublic Self-hosted repository
make 2 asserts in galois_auto debug_asserts
Janmajaya Mall janmajayamall@protonmail.com
Wed, 05 Jun 2024 18:18:49 +0530
commit

9b09549e18d125ecdd5f8e2da779426a48559475

parent

3f624f04ded28978f27f5909aad8f8ee21dc12cf

2 files changed, 6 insertions(+), 6 deletions(-)

jump to
M src/pbs.rs → src/pbs.rs

@@ -240,7 +240,7 @@ // dbg!(q_by_4 + i);

let s_indices = &gk_to_si[q_by_4 + i]; s_indices.iter().for_each(|s_index| { - // let new = std::time::Instant::now(); + let new = std::time::Instant::now(); rlwe_by_rgsw( trivial_rlwe_test_poly, pbs_key.rgsw_ct_lwe_si(*s_index),

@@ -249,14 +249,14 @@ rlwe_rgsw_decomposer,

ntt_op, mod_op, ); - // println!("Rlwe x Rgsw time: {:?}", new.elapsed()); + println!("Rlwe x Rgsw time: {:?}", new.elapsed()); }); v += 1; if gk_to_si[q_by_4 + i - 1].len() != 0 || v == w || i == 1 { let (auto_map_index, auto_map_sign) = parameters.rlwe_auto_map(v); - // let now = std::time::Instant::now(); + let now = std::time::Instant::now(); galois_auto( trivial_rlwe_test_poly, pbs_key.galois_key_for_auto(v),

@@ -267,7 +267,7 @@ mod_op,

ntt_op, auto_decomposer, ); - // println!("Auto time: {:?}", now.elapsed()); + println!("Auto time: {:?}", now.elapsed()); count += 1; v = 0;
M src/rgsw.rs → src/rgsw.rs

@@ -564,8 +564,8 @@ // irrelevant extra FMA or NTT ops.

let (scratch_matrix_d_ring, other_half) = scratch_matrix.split_at_row_mut(d); let (tmp_rlwe_out, _) = other_half.split_at_mut(2); - assert!(tmp_rlwe_out.len() == 2); - assert!(scratch_matrix_d_ring.len() == d); + debug_assert!(tmp_rlwe_out.len() == 2); + debug_assert!(scratch_matrix_d_ring.len() == d); if !rlwe_in.is_trivial() { tmp_rlwe_out.iter_mut().for_each(|r| {