in src/rqpoly.rs [171:196]
fn lazy_ntt(&mut self)
{
let context = self.context.as_ref().unwrap();
if self.is_ntt_form {
panic!("is already in ntt");
}
let q = context.q.rep();
let mut coeffs_u64: Vec<u64> = self.coeffs.iter()
.map(|elm| elm.rep())
.collect();
let roots_u64: Vec<u64> = context.roots.iter()
.map(|elm| elm.rep())
.collect();
let scaledroots_u64: Vec<u64> = context.scaled_roots.iter()
.map(|elm| elm.rep())
.collect();
lazy_ntt_u64(&mut coeffs_u64, &roots_u64, &scaledroots_u64, q);
for (coeff, coeff_u64) in self.coeffs.iter_mut().zip(coeffs_u64.iter()){
*coeff = T::modulus(&T::from(*coeff_u64), &context.q);
}
self.set_ntt_form(true);
}