pub struct Plan32(/* private fields */);
Expand description
Negacyclic NTT plan for multiplying two 32bit polynomials.
Implementations§
Source§impl Plan32
impl Plan32
Sourcepub fn try_new(n: usize) -> Option<Self>
pub fn try_new(n: usize) -> Option<Self>
Returns a negacyclic NTT plan for the given polynomial size, or None
if no
suitable roots of unity can be found for the wanted parameters.
pub fn ntt_0(&self) -> &Plan
pub fn ntt_1(&self) -> &Plan
pub fn ntt_2(&self) -> &Plan
pub fn fwd( &self, value: &[u32], mod_p0: &mut [u32], mod_p1: &mut [u32], mod_p2: &mut [u32], )
pub fn inv( &self, value: &mut [u32], mod_p0: &mut [u32], mod_p1: &mut [u32], mod_p2: &mut [u32], )
Sourcepub fn negacyclic_polymul(&self, prod: &mut [u32], lhs: &[u32], rhs: &[u32])
pub fn negacyclic_polymul(&self, prod: &mut [u32], lhs: &[u32], rhs: &[u32])
Computes the negacyclic polynomial product of lhs
and rhs
, and stores the result in
prod
.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Plan32
impl RefUnwindSafe for Plan32
impl Send for Plan32
impl Sync for Plan32
impl Unpin for Plan32
impl UnwindSafe for Plan32
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more