pub struct Plan52(/* private fields */);
Available on crate feature
nightly
only.Expand description
Negacyclic NTT plan for multiplying two 32bit polynomials, where the RHS contains binary
coefficients.
This can be more efficient than Plan32
, but requires the AVX512 instruction set.
Implementations§
Source§impl Plan52
impl Plan52
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, or if the AVX512
instruction set isn’t detected.
pub fn fwd(&self, value: &[u64], mod_p0: &mut [u64], mod_p1: &mut [u64])
pub fn fwd_binary(&self, value: &[u64], mod_p0: &mut [u64], mod_p1: &mut [u64])
pub fn inv(&self, value: &mut [u64], mod_p0: &mut [u64], mod_p1: &mut [u64])
Sourcepub fn negacyclic_polymul(
&self,
prod: &mut [u64],
lhs: &[u64],
rhs_binary: &[u64],
)
pub fn negacyclic_polymul( &self, prod: &mut [u64], lhs: &[u64], rhs_binary: &[u64], )
Computes the negacyclic polynomial product of lhs
and rhs
, and stores the result in
prod
.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Plan52
impl RefUnwindSafe for Plan52
impl Send for Plan52
impl Sync for Plan52
impl Unpin for Plan52
impl UnwindSafe for Plan52
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