make 2 asserts in galois_auto debug_asserts

This commit is contained in:
Janmajaya Mall
2024-06-05 18:18:49 +05:30
parent 3f624f04de
commit 9b09549e18
2 changed files with 6 additions and 6 deletions

View File

@@ -240,7 +240,7 @@ fn blind_rotation<
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 @@ fn blind_rotation<
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 @@ fn blind_rotation<
ntt_op,
auto_decomposer,
);
// println!("Auto time: {:?}", now.elapsed());
println!("Auto time: {:?}", now.elapsed());
count += 1;
v = 0;

View File

@@ -564,8 +564,8 @@ pub(crate) fn galois_auto<
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| {