pub struct Plan32(/* private fields */);
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 fwd( &self, value: &[u128], mod_p0: &mut [u32], mod_p1: &mut [u32], mod_p2: &mut [u32], mod_p3: &mut [u32], mod_p4: &mut [u32], )
pub fn fwd_binary( &self, value: &[u128], mod_p0: &mut [u32], mod_p1: &mut [u32], mod_p2: &mut [u32], mod_p3: &mut [u32], mod_p4: &mut [u32], )
pub fn inv( &self, value: &mut [u128], mod_p0: &mut [u32], mod_p1: &mut [u32], mod_p2: &mut [u32], mod_p3: &mut [u32], mod_p4: &mut [u32], )
Sourcepub fn negacyclic_polymul(&self, prod: &mut [u128], lhs: &[u128], rhs: &[u128])
pub fn negacyclic_polymul(&self, prod: &mut [u128], lhs: &[u128], rhs: &[u128])
Computes the negacyclic polynomial product of lhs
and rhs
, and stores the result in
prod
.
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