Skip to main content

Module

Struct Module 

Source
pub struct Module<B: Backend> { /* private fields */ }
Expand description

Primary entry point for all polynomial operations over Z[X]/(X^N + 1).

A Module pairs a ring degree N (always a power of two) with a backend-specific handle that holds any required precomputed state. All api trait methods are dispatched through this type.

The module owns its handle; dropping the Module calls Backend::destroy.

Implementations§

Source§

impl<B: Backend> Module<B>

Source

pub fn new(n: u64) -> Self
where Self: ModuleNew<B>,

Creates a backend module for ring degree N.

Source

pub unsafe fn from_nonnull(ptr: NonNull<B::Handle>, n: u64) -> Self

Creates a module from a NonNull backend handle.

§Safety

ptr must point to a valid, fully initialized backend handle whose lifetime is transferred to this Module (it will be destroyed on drop).

Source

pub unsafe fn from_raw_parts(ptr: *mut B::Handle, n: u64) -> Self

Construct from a raw pointer managed elsewhere. SAFETY: ptr must be non-null and remain valid for the lifetime of this Module.

Source

pub unsafe fn ptr(&self) -> *mut <B as Backend>::Handle

Returns the raw pointer to the backend handle.

Source

pub fn n(&self) -> usize

Returns the ring degree N.

Source

pub fn scalar_znx_alloc(&self, cols: usize) -> ScalarZnx<B::OwnedBuf>

Allocates a zero-initialized backend-owned ScalarZnx.

Source

pub fn vec_znx_alloc(&self, cols: usize, size: usize) -> VecZnx<B::OwnedBuf>

Allocates a zero-initialized backend-owned VecZnx.

Source

pub fn vec_znx_alloc_with_max_size( &self, cols: usize, size: usize, max_size: usize, ) -> VecZnx<B::OwnedBuf>

Allocates a zero-initialized backend-owned VecZnx with explicit limb capacity.

Source

pub fn mat_znx_alloc( &self, rows: usize, cols_in: usize, cols_out: usize, size: usize, ) -> MatZnx<B::OwnedBuf>

Allocates a zero-initialized backend-owned MatZnx.

Source

pub fn as_mut_ptr(&self) -> *mut B::Handle

Returns the raw pointer to the backend handle.

Source

pub fn log_n(&self) -> usize

Returns log2(N).

Source

pub fn reinterpret<Other>(&self) -> &Module<Other>
where Other: Backend<Handle = B::Handle>,

Reinterprets this Module<B> as a Module<Other> sharing the same backend Handle type.

This is a zero-cost view used to forward API calls to a compatible source backend without rebuilding the handle.

Source

pub fn reinterpret_mut<Other>(&mut self) -> &mut Module<Other>
where Other: Backend<Handle = B::Handle>,

Mutable version of Module::reinterpret.

Trait Implementations§

Source§

impl<BE: Backend> CnvPVecAlloc<BE> for Module<BE>

Source§

fn cnv_pvec_left_alloc( &self, cols: usize, size: usize, ) -> CnvPVecL<BE::OwnedBuf, BE>

Source§

fn cnv_pvec_right_alloc( &self, cols: usize, size: usize, ) -> CnvPVecR<BE::OwnedBuf, BE>

Source§

impl<BE: Backend> CnvPVecBytesOf for Module<BE>

Source§

impl<BE> Convolution<BE> for Module<BE>
where BE: HalConvolutionImpl<BE> + Backend,

Source§

fn cnv_prepare_left_tmp_bytes(&self, res_size: usize, a_size: usize) -> usize

Returns scratch bytes required for cnv_prepare_left.
Source§

fn cnv_prepare_left( &self, res: &mut CnvPVecLBackendMut<'_, BE>, a: &VecZnxBackendRef<'_, BE>, mask: i64, scratch: &mut ScratchArena<'_, BE>, )

Prepares a coefficient-domain VecZnx as the left operand of a bivariate convolution.
Source§

fn cnv_prepare_right_tmp_bytes(&self, res_size: usize, a_size: usize) -> usize

Returns scratch bytes required for cnv_prepare_right.
Source§

fn cnv_prepare_right( &self, res: &mut CnvPVecRBackendMut<'_, BE>, a: &VecZnxBackendRef<'_, BE>, mask: i64, scratch: &mut ScratchArena<'_, BE>, )

Prepares a coefficient-domain VecZnx as the right operand of a bivariate convolution.
Source§

fn cnv_apply_dft_tmp_bytes( &self, cnv_offset: usize, res_size: usize, a_size: usize, b_size: usize, ) -> usize

Returns scratch bytes required for cnv_apply_dft.
Source§

fn cnv_by_const_apply_tmp_bytes( &self, res_size: usize, cnv_offset: usize, a_size: usize, b_size: usize, ) -> usize

Returns scratch bytes required for cnv_by_const_apply.
Source§

fn cnv_by_const_apply( &self, cnv_offset: usize, res: &mut VecZnxBigBackendMut<'_, BE>, res_col: usize, a: &VecZnxBackendRef<'_, BE>, a_col: usize, b: &VecZnxBackendRef<'_, BE>, b_col: usize, b_coeff: usize, scratch: &mut ScratchArena<'_, BE>, )

Evaluates a bivariate convolution over Z[X, Y] (x) Z[Y] mod (X^N + 1) where Y = 2^-K over the selected columns and stores the result on the selected column, scaled by 2^{cnv_offset * Base2K} Read more
Source§

fn cnv_apply_dft( &self, cnv_offset: usize, res: &mut VecZnxDftBackendMut<'_, BE>, res_col: usize, a: &CnvPVecLBackendRef<'_, BE>, a_col: usize, b: &CnvPVecRBackendRef<'_, BE>, b_col: usize, scratch: &mut ScratchArena<'_, BE>, )

Evaluates a bivariate convolution over Z[X, Y] (x) Z[X, Y] mod (X^N + 1) where Y = 2^-K over the selected columns and stores the result on the selected column, scaled by 2^{cnv_offset * Base2K} Read more
Source§

fn cnv_pairwise_apply_dft_tmp_bytes( &self, cnv_offset: usize, res_size: usize, a_size: usize, b_size: usize, ) -> usize

Returns scratch bytes required for cnv_pairwise_apply_dft.
Source§

fn cnv_pairwise_apply_dft( &self, cnv_offset: usize, res: &mut VecZnxDftBackendMut<'_, BE>, res_col: usize, a: &CnvPVecLBackendRef<'_, BE>, b: &CnvPVecRBackendRef<'_, BE>, i: usize, j: usize, scratch: &mut ScratchArena<'_, BE>, )

Evaluates the bivariate pair-wise convolution res = (a[i] + a[j]) * (b[i] + b[j]). If i == j then calls Convolution::cnv_apply_dft, i.e. res = a[i] * b[i]. See Convolution::cnv_apply_dft for information about the bivariate convolution.
Source§

fn cnv_prepare_self_tmp_bytes(&self, res_size: usize, a_size: usize) -> usize

Returns scratch bytes required for cnv_prepare_self.
Source§

fn cnv_prepare_self( &self, left: &mut CnvPVecLBackendMut<'_, BE>, right: &mut CnvPVecRBackendMut<'_, BE>, a: &VecZnxBackendRef<'_, BE>, mask: i64, scratch: &mut ScratchArena<'_, BE>, )

Prepares both left and right convolution operands from the same input polynomial, sharing the FFT/NTT computation. This is an optimization for self-convolution (squaring) where both operands are the same polynomial.
Source§

impl<BE: Backend> CyclotomicOrder for Module<BE>
where Self: ModuleN,

Source§

fn cyclotomic_order(&self) -> i64

Returns 2N, the order of the cyclotomic polynomial X^N + 1.
Source§

impl<B: Backend> Drop for Module<B>

Source§

fn drop(&mut self)

Executes the destructor for this type. Read more
Source§

fn pin_drop(self: Pin<&mut Self>)

🔬This is a nightly-only experimental API. (pin_ergonomics)
Execute the destructor for this type, but different to Drop::drop, it requires self to be pinned. Read more
Source§

impl<BE: Backend> GaloisElement for Module<BE>
where Self: CyclotomicOrder,

Source§

fn galois_element(&self, generator: i64) -> i64

Returns GALOISGENERATOR^|generator| * sign(generator) mod 2N.
Source§

fn galois_element_inv(&self, gal_el: i64) -> i64

Returns the inverse of gal_el in the Galois group (Z/2NZ)*. Read more
Source§

impl<B: Backend> MatZnxAlloc<B> for Module<B>

Source§

fn mat_znx_alloc( &self, rows: usize, cols_in: usize, cols_out: usize, size: usize, ) -> MatZnx<B::OwnedBuf>

Source§

impl<BE: Backend> ModuleLogN for Module<BE>
where Self: ModuleN,

Source§

fn log_n(&self) -> usize

Source§

impl<B> ModuleN for Module<B>
where B: Backend,

Source§

fn n(&self) -> usize

Source§

impl<B> ModuleNew<B> for Module<B>
where B: Backend + HalModuleImpl<B>,

Source§

fn new(n: u64) -> Self

Source§

impl<B: Backend> ScalarZnxAlloc<B> for Module<B>

Source§

impl<B> ScalarZnxFillBinaryBlockBackend<B> for Module<B>
where B: Backend + HalVecZnxImpl<B>,

Source§

fn scalar_znx_fill_binary_block_backend( &self, res: &mut ScalarZnxBackendMut<'_, B>, res_col: usize, block_size: usize, seed: [u8; 32], )

Source§

impl<B> ScalarZnxFillBinaryBlockSourceBackend<B> for Module<B>
where B: Backend + HalVecZnxImpl<B>,

Source§

fn scalar_znx_fill_binary_block_source_backend( &self, res: &mut ScalarZnxBackendMut<'_, B>, res_col: usize, block_size: usize, source: &mut Source, )

Source§

impl<B> ScalarZnxFillBinaryHwBackend<B> for Module<B>
where B: Backend + HalVecZnxImpl<B>,

Source§

fn scalar_znx_fill_binary_hw_backend( &self, res: &mut ScalarZnxBackendMut<'_, B>, res_col: usize, hw: usize, seed: [u8; 32], )

Source§

impl<B> ScalarZnxFillBinaryHwSourceBackend<B> for Module<B>
where B: Backend + HalVecZnxImpl<B>,

Source§

fn scalar_znx_fill_binary_hw_source_backend( &self, res: &mut ScalarZnxBackendMut<'_, B>, res_col: usize, hw: usize, source: &mut Source, )

Source§

impl<B> ScalarZnxFillBinaryProbBackend<B> for Module<B>
where B: Backend + HalVecZnxImpl<B>,

Source§

fn scalar_znx_fill_binary_prob_backend( &self, res: &mut ScalarZnxBackendMut<'_, B>, res_col: usize, prob: f64, seed: [u8; 32], )

Source§

impl<B> ScalarZnxFillBinaryProbSourceBackend<B> for Module<B>
where B: Backend + HalVecZnxImpl<B>,

Source§

fn scalar_znx_fill_binary_prob_source_backend( &self, res: &mut ScalarZnxBackendMut<'_, B>, res_col: usize, prob: f64, source: &mut Source, )

Source§

impl<B> ScalarZnxFillTernaryHwBackend<B> for Module<B>
where B: Backend + HalVecZnxImpl<B>,

Source§

fn scalar_znx_fill_ternary_hw_backend( &self, res: &mut ScalarZnxBackendMut<'_, B>, res_col: usize, hw: usize, seed: [u8; 32], )

Source§

impl<B> ScalarZnxFillTernaryHwSourceBackend<B> for Module<B>
where B: Backend + HalVecZnxImpl<B>,

Source§

fn scalar_znx_fill_ternary_hw_source_backend( &self, res: &mut ScalarZnxBackendMut<'_, B>, res_col: usize, hw: usize, source: &mut Source, )

Source§

impl<B> ScalarZnxFillTernaryProbBackend<B> for Module<B>
where B: Backend + HalVecZnxImpl<B>,

Source§

fn scalar_znx_fill_ternary_prob_backend( &self, res: &mut ScalarZnxBackendMut<'_, B>, res_col: usize, prob: f64, seed: [u8; 32], )

Source§

impl<B> ScalarZnxFillTernaryProbSourceBackend<B> for Module<B>
where B: Backend + HalVecZnxImpl<B>,

Source§

fn scalar_znx_fill_ternary_prob_source_backend( &self, res: &mut ScalarZnxBackendMut<'_, B>, res_col: usize, prob: f64, source: &mut Source, )

Source§

impl<B> SvpApplyDft<B> for Module<B>
where B: Backend + HalSvpImpl<B>,

Source§

fn svp_apply_dft( &self, res: &mut VecZnxDftBackendMut<'_, B>, res_col: usize, a: &SvpPPolBackendRef<'_, B>, a_col: usize, b: &VecZnxBackendRef<'_, B>, b_col: usize, )

Source§

impl<B> SvpApplyDftToDft<B> for Module<B>
where B: Backend + HalSvpImpl<B>,

Source§

fn svp_apply_dft_to_dft( &self, res: &mut VecZnxDftBackendMut<'_, B>, res_col: usize, a: &SvpPPolBackendRef<'_, B>, a_col: usize, b: &VecZnxDftBackendRef<'_, B>, b_col: usize, )

Source§

impl<B> SvpApplyDftToDftAssign<B> for Module<B>
where B: Backend + HalSvpImpl<B>,

Source§

fn svp_apply_dft_to_dft_assign( &self, res: &mut VecZnxDftBackendMut<'_, B>, res_col: usize, a: &SvpPPolBackendRef<'_, B>, a_col: usize, )

Source§

impl<B: Backend> SvpPPolAlloc<B> for Module<B>

Source§

impl<B: Backend> SvpPPolBytesOf for Module<B>

Source§

impl<B> SvpPPolCopyBackend<B> for Module<B>
where B: Backend + HalSvpImpl<B>,

Source§

fn svp_ppol_copy_backend( &self, res: &mut SvpPPolBackendMut<'_, B>, res_col: usize, a: &SvpPPolBackendRef<'_, B>, a_col: usize, )

Source§

impl<B> SvpPrepare<B> for Module<B>
where B: Backend + HalSvpImpl<B>,

Source§

fn svp_prepare( &self, res: &mut SvpPPolBackendMut<'_, B>, res_col: usize, a: &ScalarZnxBackendRef<'_, B>, a_col: usize, )

Source§

impl<B> VecZnxAddAssignBackend<B> for Module<B>
where B: Backend + HalVecZnxImpl<B>,

Source§

fn vec_znx_add_assign_backend( &self, res: &mut VecZnxBackendMut<'_, B>, res_col: usize, a: &VecZnxBackendRef<'_, B>, a_col: usize, )

Source§

impl<B> VecZnxAddConstAssignBackend<B> for Module<B>
where B: Backend + HalVecZnxImpl<B>,

Source§

fn vec_znx_add_const_assign_backend( &self, res: &mut VecZnxBackendMut<'_, B>, res_col: usize, cnst: &VecZnxBackendRef<'_, B>, cnst_col: usize, cnst_coeff: usize, res_limb: usize, res_coeff: usize, )

Source§

impl<B> VecZnxAddConstIntoBackend<B> for Module<B>
where B: Backend + HalVecZnxImpl<B>,

Source§

fn vec_znx_add_const_into_backend( &self, res: &mut VecZnxBackendMut<'_, B>, res_col: usize, a: &VecZnxBackendRef<'_, B>, a_col: usize, cnst: &VecZnxBackendRef<'_, B>, cnst_col: usize, cnst_coeff: usize, res_limb: usize, res_coeff: usize, )

Source§

impl<B> VecZnxAddIntoBackend<B> for Module<B>
where B: Backend + HalVecZnxImpl<B>,

Source§

fn vec_znx_add_into_backend( &self, res: &mut VecZnxBackendMut<'_, B>, res_col: usize, a: &VecZnxBackendRef<'_, B>, a_col: usize, b: &VecZnxBackendRef<'_, B>, b_col: usize, )

Adds the selected backend-native column of a to the selected backend-native column of b.
Source§

impl<B> VecZnxAddNormalBackend<B> for Module<B>
where B: Backend + HalVecZnxImpl<B>,

Source§

fn vec_znx_add_normal_backend( &self, base2k: usize, res: &mut VecZnxBackendMut<'_, B>, res_col: usize, noise_infos: NoiseInfos, seed: [u8; 32], )

Adds backend-defined normal noise to the selected backend-native column using seed.
Source§

impl<B> VecZnxAddNormalSourceBackend<B> for Module<B>
where B: Backend + HalVecZnxImpl<B>,

Source§

fn vec_znx_add_normal_source_backend( &self, base2k: usize, res: &mut VecZnxBackendMut<'_, B>, res_col: usize, noise_infos: NoiseInfos, source_xe: &mut Source, )

Adds a discrete normal vector scaled by 2^{-k} with the provided standard deviation and bounded to [-bound, bound].
Source§

impl<B> VecZnxAddScalarAssignBackend<B> for Module<B>
where B: Backend + HalVecZnxImpl<B>,

Source§

fn vec_znx_add_scalar_assign_backend( &self, res: &mut VecZnxBackendMut<'_, B>, res_col: usize, res_limb: usize, a: &ScalarZnxBackendRef<'_, B>, a_col: usize, )

Source§

impl<B> VecZnxAddScalarIntoBackend<B> for Module<B>
where B: Backend + HalVecZnxImpl<B>,

Source§

fn vec_znx_add_scalar_into_backend( &self, res: &mut VecZnxBackendMut<'_, B>, res_col: usize, a: &ScalarZnxBackendRef<'_, B>, a_col: usize, b: &VecZnxBackendRef<'_, B>, b_col: usize, b_limb: usize, )

Source§

impl<B: Backend> VecZnxAlloc<B> for Module<B>

Source§

fn vec_znx_alloc(&self, cols: usize, size: usize) -> VecZnx<B::OwnedBuf>

Source§

fn vec_znx_alloc_with_max_size( &self, cols: usize, size: usize, max_size: usize, ) -> VecZnx<B::OwnedBuf>

Source§

impl<B> VecZnxAutomorphismAssignBackend<B> for Module<B>
where B: Backend + HalVecZnxImpl<B>,

Source§

fn vec_znx_automorphism_assign_backend( &self, k: i64, res: &mut VecZnxBackendMut<'_, B>, res_col: usize, scratch: &mut ScratchArena<'_, B>, )

Applies the automorphism X^i -> X^ik on the selected column of a.
Source§

impl<B> VecZnxAutomorphismAssignTmpBytes for Module<B>
where B: Backend + HalVecZnxImpl<B>,

Source§

impl<B> VecZnxAutomorphismBackend<B> for Module<B>
where B: Backend + HalVecZnxImpl<B>,

Source§

fn vec_znx_automorphism_backend( &self, k: i64, res: &mut VecZnxBackendMut<'_, B>, res_col: usize, a: &VecZnxBackendRef<'_, B>, a_col: usize, )

Applies the automorphism X^i -> X^ik on the selected column of a and stores the result in res_col column of res.
Source§

impl<B> VecZnxBigAddAssign<B> for Module<B>
where B: Backend + HalVecZnxBigImpl<B>,

Source§

fn vec_znx_big_add_assign( &self, res: &mut VecZnxBigBackendMut<'_, B>, res_col: usize, a: &VecZnxBigBackendRef<'_, B>, a_col: usize, )

Adds a to b and stores the result on b.
Source§

impl<B> VecZnxBigAddInto<B> for Module<B>
where B: Backend + HalVecZnxBigImpl<B>,

Source§

fn vec_znx_big_add_into( &self, res: &mut VecZnxBigBackendMut<'_, B>, res_col: usize, a: &VecZnxBigBackendRef<'_, B>, a_col: usize, b: &VecZnxBigBackendRef<'_, B>, b_col: usize, )

Adds a to b and stores the result on c.
Source§

impl<B> VecZnxBigAddNormal<B> for Module<B>
where B: Backend + HalVecZnxBigImpl<B>,

Source§

fn vec_znx_big_add_normal( &self, base2k: usize, res: &mut VecZnxBigBackendMut<'_, B>, res_col: usize, noise_infos: NoiseInfos, source: &mut Source, )

Source§

impl<B> VecZnxBigAddNormalBackend<B> for Module<B>
where B: Backend + HalVecZnxBigImpl<B>,

Source§

fn vec_znx_big_add_normal_backend( &self, base2k: usize, res: &mut VecZnxBigBackendMut<'_, B>, res_col: usize, noise_infos: NoiseInfos, seed: [u8; 32], )

Source§

impl<B> VecZnxBigAddSmallAssign<B> for Module<B>
where B: Backend + HalVecZnxBigImpl<B>,

Source§

fn vec_znx_big_add_small_assign( &self, res: &mut VecZnxBigBackendMut<'_, B>, res_col: usize, a: &VecZnxBackendRef<'_, B>, a_col: usize, )

Adds a to b and stores the result on b.
Source§

impl<B> VecZnxBigAddSmallIntoBackend<B> for Module<B>
where B: Backend + HalVecZnxBigImpl<B>,

Source§

fn vec_znx_big_add_small_into_backend( &self, res: &mut VecZnxBigBackendMut<'_, B>, res_col: usize, a: &VecZnxBigBackendRef<'_, B>, a_col: usize, b: &VecZnxBackendRef<'_, B>, b_col: usize, )

Adds a to b and stores the result on c.
Source§

impl<B: Backend> VecZnxBigAlloc<B> for Module<B>

Source§

fn vec_znx_big_alloc(&self, cols: usize, size: usize) -> VecZnxBigOwned<B>

Source§

fn vec_znx_big_alloc_n( &self, n: usize, cols: usize, size: usize, ) -> VecZnxBigOwned<B>

Source§

impl<B> VecZnxBigAutomorphism<B> for Module<B>
where B: Backend + HalVecZnxBigImpl<B>,

Source§

fn vec_znx_big_automorphism( &self, k: i64, res: &mut VecZnxBigBackendMut<'_, B>, res_col: usize, a: &VecZnxBigBackendRef<'_, B>, a_col: usize, )

Applies the automorphism X^i -> X^ik on a and stores the result on b.
Source§

impl<B> VecZnxBigAutomorphismAssign<B> for Module<B>
where B: Backend + HalVecZnxBigImpl<B>,

Source§

fn vec_znx_big_automorphism_assign( &self, k: i64, a: &mut VecZnxBigBackendMut<'_, B>, a_col: usize, scratch: &mut ScratchArena<'_, B>, )

Applies the automorphism X^i -> X^ik on a and stores the result on a.
Source§

impl<B> VecZnxBigAutomorphismAssignTmpBytes for Module<B>
where B: Backend + HalVecZnxBigImpl<B>,

Source§

impl<B: Backend> VecZnxBigBytesOf for Module<B>

Source§

fn bytes_of_vec_znx_big(&self, cols: usize, size: usize) -> usize

Source§

fn bytes_of_vec_znx_big_n(&self, n: usize, cols: usize, size: usize) -> usize

Source§

impl<B: Backend> VecZnxBigFromBytes<B> for Module<B>

Source§

fn vec_znx_big_from_bytes( &self, cols: usize, size: usize, bytes: Vec<u8>, ) -> VecZnxBigOwned<B>

Source§

fn vec_znx_big_from_bytes_n( &self, n: usize, cols: usize, size: usize, bytes: Vec<u8>, ) -> VecZnxBigOwned<B>

Source§

impl<B> VecZnxBigFromSmallBackend<B> for Module<B>
where B: Backend + HalVecZnxBigImpl<B>,

Source§

fn vec_znx_big_from_small_backend( &self, res: &mut VecZnxBigBackendMut<'_, B>, res_col: usize, a: &VecZnxBackendRef<'_, B>, a_col: usize, )

Source§

impl<B> VecZnxBigInnerSumBackend<B> for Module<B>
where B: Backend + HalVecZnxBigImpl<B>,

Source§

fn vec_znx_big_inner_sum_backend( &self, res: &mut VecZnxBigBackendMut<'_, B>, res_col: usize, res_coeff: usize, a: &VecZnxBigBackendRef<'_, B>, a_col: usize, )

Source§

impl<B> VecZnxBigNegate<B> for Module<B>
where B: Backend + HalVecZnxBigImpl<B>,

Source§

fn vec_znx_big_negate( &self, res: &mut VecZnxBigBackendMut<'_, B>, res_col: usize, a: &VecZnxBigBackendRef<'_, B>, a_col: usize, )

Source§

impl<B> VecZnxBigNegateAssign<B> for Module<B>
where B: Backend + HalVecZnxBigImpl<B>,

Source§

fn vec_znx_big_negate_assign( &self, a: &mut VecZnxBigBackendMut<'_, B>, a_col: usize, )

Source§

impl<B> VecZnxBigNormalize<B> for Module<B>
where B: Backend + HalVecZnxBigImpl<B>,

Source§

fn vec_znx_big_normalize( &self, res: &mut VecZnxBackendMut<'_, B>, res_base2k: usize, res_offset: i64, res_col: usize, a: &VecZnxBigBackendRef<'_, B>, a_base2k: usize, a_col: usize, scratch: &mut ScratchArena<'_, B>, )

Source§

impl<B> VecZnxBigNormalizeTmpBytes for Module<B>
where B: Backend + HalVecZnxBigImpl<B>,

Source§

impl<B> VecZnxBigSub<B> for Module<B>
where B: Backend + HalVecZnxBigImpl<B>,

Source§

fn vec_znx_big_sub( &self, res: &mut VecZnxBigBackendMut<'_, B>, res_col: usize, a: &VecZnxBigBackendRef<'_, B>, a_col: usize, b: &VecZnxBigBackendRef<'_, B>, b_col: usize, )

Subtracts a to b and stores the result on c.
Source§

impl<B> VecZnxBigSubAssign<B> for Module<B>
where B: Backend + HalVecZnxBigImpl<B>,

Source§

fn vec_znx_big_sub_assign( &self, res: &mut VecZnxBigBackendMut<'_, B>, res_col: usize, a: &VecZnxBigBackendRef<'_, B>, a_col: usize, )

Subtracts a from b and stores the result on b.
Source§

impl<B> VecZnxBigSubNegateAssign<B> for Module<B>
where B: Backend + HalVecZnxBigImpl<B>,

Source§

fn vec_znx_big_sub_negate_assign( &self, res: &mut VecZnxBigBackendMut<'_, B>, res_col: usize, a: &VecZnxBigBackendRef<'_, B>, a_col: usize, )

Subtracts b from a and stores the result on b.
Source§

impl<B> VecZnxBigSubSmallABackend<B> for Module<B>
where B: Backend + HalVecZnxBigImpl<B>,

Source§

fn vec_znx_big_sub_small_a_backend( &self, res: &mut VecZnxBigBackendMut<'_, B>, res_col: usize, a: &VecZnxBackendRef<'_, B>, a_col: usize, b: &VecZnxBigBackendRef<'_, B>, b_col: usize, )

Subtracts b from a and stores the result on c.
Source§

impl<B> VecZnxBigSubSmallAssign<B> for Module<B>
where B: Backend + HalVecZnxBigImpl<B>,

Source§

fn vec_znx_big_sub_small_assign( &self, res: &mut VecZnxBigBackendMut<'_, B>, res_col: usize, a: &VecZnxBackendRef<'_, B>, a_col: usize, )

Subtracts a from res and stores the result on res.
Source§

impl<B> VecZnxBigSubSmallBBackend<B> for Module<B>
where B: Backend + HalVecZnxBigImpl<B>,

Source§

fn vec_znx_big_sub_small_b_backend( &self, res: &mut VecZnxBigBackendMut<'_, B>, res_col: usize, a: &VecZnxBigBackendRef<'_, B>, a_col: usize, b: &VecZnxBackendRef<'_, B>, b_col: usize, )

Subtracts b from a and stores the result on c.
Source§

impl<B> VecZnxBigSubSmallNegateAssign<B> for Module<B>
where B: Backend + HalVecZnxBigImpl<B>,

Source§

fn vec_znx_big_sub_small_negate_assign( &self, res: &mut VecZnxBigBackendMut<'_, B>, res_col: usize, a: &VecZnxBackendRef<'_, B>, a_col: usize, )

Subtracts res from a and stores the result on res.
Source§

impl<B> VecZnxCopyBackend<B> for Module<B>
where B: Backend + HalVecZnxImpl<B>,

Source§

fn vec_znx_copy_backend( &self, res: &mut VecZnxBackendMut<'_, B>, res_col: usize, a: &VecZnxBackendRef<'_, B>, a_col: usize, )

Source§

impl<B> VecZnxCopyRangeBackend<B> for Module<B>
where B: Backend + HalVecZnxImpl<B>,

Source§

fn vec_znx_copy_range_backend( &self, res: &mut VecZnxBackendMut<'_, B>, res_col: usize, res_limb: usize, res_offset: usize, a: &VecZnxBackendRef<'_, B>, a_col: usize, a_limb: usize, a_offset: usize, len: usize, )

Source§

impl<B> VecZnxDftAddAssign<B> for Module<B>
where B: Backend + HalVecZnxDftImpl<B>,

Source§

fn vec_znx_dft_add_assign( &self, res: &mut VecZnxDftBackendMut<'_, B>, res_col: usize, a: &VecZnxDftBackendRef<'_, B>, a_col: usize, )

Source§

impl<B> VecZnxDftAddInto<B> for Module<B>
where B: Backend + HalVecZnxDftImpl<B>,

Source§

fn vec_znx_dft_add_into( &self, res: &mut VecZnxDftBackendMut<'_, B>, res_col: usize, a: &VecZnxDftBackendRef<'_, B>, a_col: usize, b: &VecZnxDftBackendRef<'_, B>, b_col: usize, )

Source§

impl<B> VecZnxDftAddScaledAssign<B> for Module<B>
where B: Backend + HalVecZnxDftImpl<B>,

Source§

fn vec_znx_dft_add_scaled_assign( &self, res: &mut VecZnxDftBackendMut<'_, B>, res_col: usize, a: &VecZnxDftBackendRef<'_, B>, a_col: usize, a_scale: i64, )

Source§

impl<B: Backend> VecZnxDftAlloc<B> for Module<B>

Source§

fn vec_znx_dft_alloc(&self, cols: usize, size: usize) -> VecZnxDftOwned<B>

Source§

impl<B> VecZnxDftApply<B> for Module<B>
where B: Backend + HalVecZnxDftImpl<B>,

Source§

fn vec_znx_dft_apply( &self, step: usize, offset: usize, res: &mut VecZnxDftBackendMut<'_, B>, res_col: usize, a: &VecZnxBackendRef<'_, B>, a_col: usize, )

Source§

impl<B: Backend> VecZnxDftBytesOf for Module<B>

Source§

fn bytes_of_vec_znx_dft(&self, cols: usize, size: usize) -> usize

Source§

impl<B> VecZnxDftCopy<B> for Module<B>
where B: Backend + HalVecZnxDftImpl<B>,

Source§

fn vec_znx_dft_copy( &self, step: usize, offset: usize, res: &mut VecZnxDftBackendMut<'_, B>, res_col: usize, a: &VecZnxDftBackendRef<'_, B>, a_col: usize, )

Source§

impl<B: Backend> VecZnxDftFromBytes<B> for Module<B>

Source§

fn vec_znx_dft_from_bytes( &self, cols: usize, size: usize, bytes: Vec<u8>, ) -> VecZnxDftOwned<B>

Source§

impl<B> VecZnxDftSub<B> for Module<B>
where B: Backend + HalVecZnxDftImpl<B>,

Source§

fn vec_znx_dft_sub( &self, res: &mut VecZnxDftBackendMut<'_, B>, res_col: usize, a: &VecZnxDftBackendRef<'_, B>, a_col: usize, b: &VecZnxDftBackendRef<'_, B>, b_col: usize, )

Source§

impl<B> VecZnxDftSubAssign<B> for Module<B>
where B: Backend + HalVecZnxDftImpl<B>,

Source§

fn vec_znx_dft_sub_assign( &self, res: &mut VecZnxDftBackendMut<'_, B>, res_col: usize, a: &VecZnxDftBackendRef<'_, B>, a_col: usize, )

Source§

impl<B> VecZnxDftSubNegateAssign<B> for Module<B>
where B: Backend + HalVecZnxDftImpl<B>,

Source§

fn vec_znx_dft_sub_negate_assign( &self, res: &mut VecZnxDftBackendMut<'_, B>, res_col: usize, a: &VecZnxDftBackendRef<'_, B>, a_col: usize, )

Source§

impl<B> VecZnxDftZero<B> for Module<B>
where B: Backend + HalVecZnxDftImpl<B>,

Source§

fn vec_znx_dft_zero(&self, res: &mut VecZnxDftBackendMut<'_, B>, res_col: usize)

Source§

impl<B> VecZnxExtractCoeffBackend<B> for Module<B>
where B: Backend + HalVecZnxImpl<B>,

Source§

fn vec_znx_extract_coeff_backend( &self, res: &mut VecZnxBackendMut<'_, B>, res_col: usize, a: &VecZnxBackendRef<'_, B>, a_col: usize, a_coeff: usize, )

Source§

impl<B> VecZnxFillNormalBackend<B> for Module<B>
where B: Backend + HalVecZnxImpl<B>,

Source§

fn vec_znx_fill_normal_backend( &self, base2k: usize, res: &mut VecZnxBackendMut<'_, B>, res_col: usize, noise_infos: NoiseInfos, seed: [u8; 32], )

Fills the selected backend-native column from a backend-defined normal sampler seeded by seed.
Source§

impl<B> VecZnxFillNormalSourceBackend<B> for Module<B>
where B: Backend + HalVecZnxImpl<B>,

Source§

fn vec_znx_fill_normal_source_backend( &self, base2k: usize, res: &mut VecZnxBackendMut<'_, B>, res_col: usize, noise_infos: NoiseInfos, source_xe: &mut Source, )

Source§

impl<B> VecZnxFillUniformBackend<B> for Module<B>
where B: Backend + HalVecZnxImpl<B>,

Source§

fn vec_znx_fill_uniform_backend( &self, base2k: usize, res: &mut VecZnxBackendMut<'_, B>, res_col: usize, seed: [u8; 32], )

Fills the selected backend-native column from a backend-defined uniform sampler seeded by seed.
Source§

impl<B> VecZnxFillUniformSourceBackend<B> for Module<B>
where B: Backend + HalVecZnxImpl<B>,

Source§

fn vec_znx_fill_uniform_source_backend( &self, base2k: usize, res: &mut VecZnxBackendMut<'_, B>, res_col: usize, source: &mut Source, )

Fills the first size size with uniform values in [-2^{base2k-1}, 2^{base2k-1}]
Source§

impl<B> VecZnxHadamardProductScalarZnxBackend<B> for Module<B>
where B: Backend + HalVecZnxImpl<B>,

Source§

fn vec_znx_hadamard_product_scalar_znx_backend( &self, res: &mut VecZnxBigBackendMut<'_, B>, res_col: usize, a: &VecZnxBackendRef<'_, B>, a_col: usize, b: &ScalarZnxBackendRef<'_, B>, b_col: usize, )

Source§

impl<B> VecZnxIdftApply<B> for Module<B>
where B: Backend + HalVecZnxDftImpl<B>,

Source§

fn vec_znx_idft_apply( &self, res: &mut VecZnxBigBackendMut<'_, B>, res_col: usize, a: &VecZnxDftBackendRef<'_, B>, a_col: usize, scratch: &mut ScratchArena<'_, B>, )

Source§

impl<B> VecZnxIdftApplyTmpA<B> for Module<B>
where B: Backend + HalVecZnxDftImpl<B>,

Source§

fn vec_znx_idft_apply_tmpa( &self, res: &mut VecZnxBigBackendMut<'_, B>, res_col: usize, a: &mut VecZnxDftBackendMut<'_, B>, a_col: usize, )

Source§

impl<B> VecZnxIdftApplyTmpBytes for Module<B>
where B: Backend + HalVecZnxDftImpl<B>,

Source§

impl<B> VecZnxLshAddCoeffIntoBackend<B> for Module<B>
where B: Backend + HalVecZnxImpl<B>,

Source§

fn vec_znx_lsh_add_coeff_into_backend( &self, base2k: usize, k: usize, res: &mut VecZnxBackendMut<'_, B>, res_col: usize, a: &VecZnxBackendRef<'_, B>, a_col: usize, a_coeff: usize, scratch: &mut ScratchArena<'_, B>, )

Source§

impl<B> VecZnxLshAddIntoBackend<B> for Module<B>
where B: Backend + HalVecZnxImpl<B>,

Source§

fn vec_znx_lsh_add_into_backend( &self, base2k: usize, k: usize, res: &mut VecZnxBackendMut<'_, B>, res_col: usize, a: &VecZnxBackendRef<'_, B>, a_col: usize, scratch: &mut ScratchArena<'_, B>, )

Left shift by k bits all columns of a.
Source§

impl<B> VecZnxLshAssignBackend<B> for Module<B>
where B: Backend + HalVecZnxImpl<B>,

Source§

fn vec_znx_lsh_assign_backend( &self, base2k: usize, k: usize, a: &mut VecZnxBackendMut<'_, B>, a_col: usize, scratch: &mut ScratchArena<'_, B>, )

Left shift by k bits all columns of a.
Source§

impl<B> VecZnxLshBackend<B> for Module<B>
where B: Backend + HalVecZnxImpl<B>,

Source§

fn vec_znx_lsh_backend( &self, base2k: usize, k: usize, res: &mut VecZnxBackendMut<'_, B>, res_col: usize, a: &VecZnxBackendRef<'_, B>, a_col: usize, scratch: &mut ScratchArena<'_, B>, )

Left shift by k bits all columns of a.
Source§

impl<B> VecZnxLshCoeffBackend<B> for Module<B>
where B: Backend + HalVecZnxImpl<B>,

Source§

fn vec_znx_lsh_coeff_backend( &self, base2k: usize, k: usize, res: &mut VecZnxBackendMut<'_, B>, res_col: usize, a: &VecZnxBackendRef<'_, B>, a_col: usize, a_coeff: usize, scratch: &mut ScratchArena<'_, B>, )

Source§

impl<B> VecZnxLshSubBackend<B> for Module<B>
where B: Backend + HalVecZnxImpl<B>,

Source§

fn vec_znx_lsh_sub_backend( &self, base2k: usize, k: usize, res: &mut VecZnxBackendMut<'_, B>, res_col: usize, a: &VecZnxBackendRef<'_, B>, a_col: usize, scratch: &mut ScratchArena<'_, B>, )

Left shift by k bits and subtract from destination.
Source§

impl<B> VecZnxLshTmpBytes for Module<B>
where B: Backend + HalVecZnxImpl<B>,

Source§

impl<B> VecZnxMergeRingsBackend<B> for Module<B>
where B: Backend + HalVecZnxImpl<B>,

Source§

fn vec_znx_merge_rings_backend( &self, res: &mut VecZnxBackendMut<'_, B>, res_col: usize, a: &[VecZnxBackendRef<'_, B>], a_col: usize, scratch: &mut ScratchArena<'_, B>, )

Merges the subrings of the selected column of a into the selected column of res. Read more
Source§

impl<B> VecZnxMergeRingsTmpBytes for Module<B>
where B: Backend + HalVecZnxImpl<B>,

Source§

impl<B> VecZnxMulXpMinusOneAssignBackend<B> for Module<B>
where B: Backend + HalVecZnxImpl<B>,

Source§

fn vec_znx_mul_xp_minus_one_assign_backend( &self, p: i64, res: &mut VecZnxBackendMut<'_, B>, res_col: usize, scratch: &mut ScratchArena<'_, B>, )

Source§

impl<B> VecZnxMulXpMinusOneAssignTmpBytes for Module<B>
where B: Backend + HalVecZnxImpl<B>,

Source§

impl<B> VecZnxMulXpMinusOneBackend<B> for Module<B>
where B: Backend + HalVecZnxImpl<B>,

Source§

fn vec_znx_mul_xp_minus_one_backend( &self, p: i64, res: &mut VecZnxBackendMut<'_, B>, res_col: usize, a: &VecZnxBackendRef<'_, B>, a_col: usize, )

Source§

impl<B> VecZnxNegateAssignBackend<B> for Module<B>
where B: Backend + HalVecZnxImpl<B>,

Source§

fn vec_znx_negate_assign_backend( &self, a: &mut VecZnxBackendMut<'_, B>, a_col: usize, )

Source§

impl<B> VecZnxNegateBackend<B> for Module<B>
where B: Backend + HalVecZnxImpl<B>,

Source§

fn vec_znx_negate_backend( &self, res: &mut VecZnxBackendMut<'_, B>, res_col: usize, a: &VecZnxBackendRef<'_, B>, a_col: usize, )

Source§

impl<B> VecZnxNormalize<B> for Module<B>
where B: Backend + HalVecZnxImpl<B>,

Source§

fn vec_znx_normalize( &self, res: &mut VecZnxBackendMut<'_, B>, res_base2k: usize, res_offset: i64, res_col: usize, a: &VecZnxBackendRef<'_, B>, a_base2k: usize, a_col: usize, scratch: &mut ScratchArena<'_, B>, )

Normalizes the selected column of a and stores the result into the selected column of res.
Source§

impl<B> VecZnxNormalizeAssignBackend<B> for Module<B>
where B: Backend + HalVecZnxImpl<B>,

Source§

fn vec_znx_normalize_assign_backend( &self, base2k: usize, a: &mut VecZnxBackendMut<'_, B>, a_col: usize, scratch: &mut ScratchArena<'_, B>, )

Source§

impl<B> VecZnxNormalizeCoeffAssignBackend<B> for Module<B>
where B: Backend + HalVecZnxImpl<B>,

Source§

fn vec_znx_normalize_coeff_assign_backend( &self, base2k: usize, a: &mut VecZnxBackendMut<'_, B>, a_col: usize, a_coeff: usize, scratch: &mut ScratchArena<'_, B>, )

Source§

impl<B> VecZnxNormalizeCoeffBackend<B> for Module<B>
where B: Backend + HalVecZnxImpl<B>,

Source§

fn vec_znx_normalize_coeff_backend( &self, res: &mut VecZnxBackendMut<'_, B>, res_base2k: usize, res_offset: i64, res_col: usize, a: &VecZnxBackendRef<'_, B>, a_base2k: usize, a_col: usize, a_coeff: usize, scratch: &mut ScratchArena<'_, B>, )

Normalizes the selected coefficient of a across its limbs into a 1-coeff destination column.
Source§

impl<B> VecZnxNormalizeTmpBytes for Module<B>
where B: Backend + HalVecZnxImpl<B>,

Source§

fn vec_znx_normalize_tmp_bytes(&self) -> usize

Returns the minimum number of bytes necessary for normalization.
Source§

impl<B> VecZnxRotateAssignBackend<B> for Module<B>
where B: Backend + HalVecZnxImpl<B>,

Source§

fn vec_znx_rotate_assign_backend( &self, k: i64, a: &mut VecZnxBackendMut<'_, B>, a_col: usize, scratch: &mut ScratchArena<'_, B>, )

Multiplies the selected column of a by X^k.
Source§

impl<B> VecZnxRotateAssignTmpBytes for Module<B>
where B: Backend + HalVecZnxImpl<B>,

Source§

impl<B> VecZnxRotateBackend<B> for Module<B>
where B: Backend + HalVecZnxImpl<B>,

Source§

fn vec_znx_rotate_backend( &self, k: i64, res: &mut VecZnxBackendMut<'_, B>, res_col: usize, a: &VecZnxBackendRef<'_, B>, a_col: usize, )

Multiplies the selected column of a by X^k and stores the result in res_col of res.
Source§

impl<B> VecZnxRshAddCoeffIntoBackend<B> for Module<B>
where B: Backend + HalVecZnxImpl<B>,

Source§

fn vec_znx_rsh_add_coeff_into_backend( &self, base2k: usize, k: usize, res: &mut VecZnxBackendMut<'_, B>, res_col: usize, a: &VecZnxBackendRef<'_, B>, a_col: usize, a_coeff: usize, res_coeff: usize, scratch: &mut ScratchArena<'_, B>, )

Source§

impl<B> VecZnxRshAddIntoBackend<B> for Module<B>
where B: Backend + HalVecZnxImpl<B>,

Source§

fn vec_znx_rsh_add_into_backend( &self, base2k: usize, k: usize, res: &mut VecZnxBackendMut<'_, B>, res_col: usize, a: &VecZnxBackendRef<'_, B>, a_col: usize, scratch: &mut ScratchArena<'_, B>, )

Right shift by k bits all columns of a.
Source§

impl<B> VecZnxRshAssignBackend<B> for Module<B>
where B: Backend + HalVecZnxImpl<B>,

Source§

fn vec_znx_rsh_assign_backend( &self, base2k: usize, k: usize, a: &mut VecZnxBackendMut<'_, B>, a_col: usize, scratch: &mut ScratchArena<'_, B>, )

Right shift by k bits all columns of a.
Source§

impl<B> VecZnxRshBackend<B> for Module<B>
where B: Backend + HalVecZnxImpl<B>,

Source§

fn vec_znx_rsh_backend( &self, base2k: usize, k: usize, res: &mut VecZnxBackendMut<'_, B>, res_col: usize, a: &VecZnxBackendRef<'_, B>, a_col: usize, scratch: &mut ScratchArena<'_, B>, )

Right shift by k bits all columns of a.
Source§

impl<B> VecZnxRshCoeffBackend<B> for Module<B>
where B: Backend + HalVecZnxImpl<B>,

Source§

fn vec_znx_rsh_coeff_backend( &self, base2k: usize, k: usize, res: &mut VecZnxBackendMut<'_, B>, res_col: usize, a: &VecZnxBackendRef<'_, B>, a_col: usize, a_coeff: usize, scratch: &mut ScratchArena<'_, B>, )

Source§

impl<B> VecZnxRshSubBackend<B> for Module<B>
where B: Backend + HalVecZnxImpl<B>,

Source§

fn vec_znx_rsh_sub_backend( &self, base2k: usize, k: usize, res: &mut VecZnxBackendMut<'_, B>, res_col: usize, a: &VecZnxBackendRef<'_, B>, a_col: usize, scratch: &mut ScratchArena<'_, B>, )

Right shift by k bits and subtract from destination.
Source§

impl<B> VecZnxRshSubCoeffIntoBackend<B> for Module<B>
where B: Backend + HalVecZnxImpl<B>,

Source§

fn vec_znx_rsh_sub_coeff_into_backend( &self, base2k: usize, k: usize, res: &mut VecZnxBackendMut<'_, B>, res_col: usize, a: &VecZnxBackendRef<'_, B>, a_col: usize, a_coeff: usize, res_coeff: usize, scratch: &mut ScratchArena<'_, B>, )

Source§

impl<B> VecZnxRshTmpBytes for Module<B>
where B: Backend + HalVecZnxImpl<B>,

Source§

impl<B> VecZnxScalarProduct<B> for Module<B>
where B: Backend + HalVecZnxBigImpl<B>,

Source§

fn vec_znx_scalar_product( &self, res: &mut VecZnxBigBackendMut<'_, B>, res_col: usize, a: &VecZnxBackendRef<'_, B>, a_col: usize, b: &ScalarZnxBackendRef<'_, B>, b_col: usize, )

Source§

impl<B> VecZnxSplitRingBackend<B> for Module<B>
where B: Backend + HalVecZnxImpl<B>,

Source§

fn vec_znx_split_ring_backend( &self, res: &mut [VecZnxBackendMut<'_, B>], res_col: usize, a: &VecZnxBackendRef<'_, B>, a_col: usize, scratch: &mut ScratchArena<'_, B>, )

Splits the selected columns of b into subrings and copies them them into the selected column of res. Read more
Source§

impl<B> VecZnxSplitRingTmpBytes for Module<B>
where B: Backend + HalVecZnxImpl<B>,

Source§

impl<B> VecZnxSubAssignBackend<B> for Module<B>
where B: Backend + HalVecZnxImpl<B>,

Source§

fn vec_znx_sub_assign_backend( &self, res: &mut VecZnxBackendMut<'_, B>, res_col: usize, a: &VecZnxBackendRef<'_, B>, a_col: usize, )

Source§

impl<B> VecZnxSubBackend<B> for Module<B>
where B: Backend + HalVecZnxImpl<B>,

Source§

fn vec_znx_sub_backend( &self, res: &mut VecZnxBackendMut<'_, B>, res_col: usize, a: &VecZnxBackendRef<'_, B>, a_col: usize, b: &VecZnxBackendRef<'_, B>, b_col: usize, )

Source§

impl<B> VecZnxSubNegateAssignBackend<B> for Module<B>
where B: Backend + HalVecZnxImpl<B>,

Source§

fn vec_znx_sub_negate_assign_backend( &self, res: &mut VecZnxBackendMut<'_, B>, res_col: usize, a: &VecZnxBackendRef<'_, B>, a_col: usize, )

Source§

impl<B> VecZnxSubScalarAssignBackend<B> for Module<B>
where B: Backend + HalVecZnxImpl<B>,

Source§

fn vec_znx_sub_scalar_assign_backend( &self, res: &mut VecZnxBackendMut<'_, B>, res_col: usize, res_limb: usize, a: &ScalarZnxBackendRef<'_, B>, a_col: usize, )

Source§

impl<B> VecZnxSubScalarBackend<B> for Module<B>
where B: Backend + HalVecZnxImpl<B>,

Source§

fn vec_znx_sub_scalar_backend( &self, res: &mut VecZnxBackendMut<'_, B>, res_col: usize, a: &ScalarZnxBackendRef<'_, B>, a_col: usize, b: &VecZnxBackendRef<'_, B>, b_col: usize, b_limb: usize, )

Source§

impl<B> VecZnxSwitchRingBackend<B> for Module<B>
where B: Backend + HalVecZnxImpl<B>,

Source§

fn vec_znx_switch_ring_backend( &self, res: &mut VecZnxBackendMut<'_, B>, res_col: usize, a: &VecZnxBackendRef<'_, B>, a_col: usize, )

Source§

impl<B> VecZnxZeroBackend<B> for Module<B>
where B: Backend + HalVecZnxImpl<B>,

Source§

fn vec_znx_zero_backend( &self, res: &mut VecZnxBackendMut<'_, B>, res_col: usize, )

Source§

impl<B> VmpApplyDft<B> for Module<B>
where B: Backend + HalVmpImpl<B>,

Source§

fn vmp_apply_dft<R>( &self, res: &mut R, a: &VecZnxBackendRef<'_, B>, b: &VmpPMatBackendRef<'_, B>, scratch: &mut ScratchArena<'_, B>, )

Source§

impl<B> VmpApplyDftTmpBytes for Module<B>
where B: Backend + HalVmpImpl<B>,

Source§

fn vmp_apply_dft_tmp_bytes( &self, res_size: usize, a_size: usize, b_rows: usize, b_cols_in: usize, b_cols_out: usize, b_size: usize, ) -> usize

Source§

impl<B> VmpApplyDftToDft<B> for Module<B>
where B: Backend + HalVmpImpl<B>,

Source§

fn vmp_apply_dft_to_dft( &self, res: &mut VecZnxDftBackendMut<'_, B>, a: &VecZnxDftBackendRef<'_, B>, b: &VmpPMatBackendRef<'_, B>, limb_offset: usize, scratch: &mut ScratchArena<'_, B>, )

Applies the vector matrix product crate::layouts::VecZnxDft x crate::layouts::VmpPMat. Read more
Source§

impl<B> VmpApplyDftToDftAccumulate<B> for Module<B>
where B: Backend + HalVmpImpl<B>,

Source§

fn vmp_apply_dft_to_dft_accumulate( &self, res: &mut VecZnxDftBackendMut<'_, B>, a: &VecZnxDftBackendRef<'_, B>, b: &VmpPMatBackendRef<'_, B>, limb_offset: usize, scratch: &mut ScratchArena<'_, B>, )

Fused res += a · pmat, shifted by limb_offset limbs.
Source§

impl<B> VmpApplyDftToDftAccumulateTmpBytes for Module<B>
where B: Backend + HalVmpImpl<B>,

Source§

fn vmp_apply_dft_to_dft_accumulate_tmp_bytes( &self, res_size: usize, a_size: usize, b_rows: usize, b_cols_in: usize, b_cols_out: usize, b_size: usize, ) -> usize

Source§

impl<B> VmpApplyDftToDftTmpBytes for Module<B>
where B: Backend + HalVmpImpl<B>,

Source§

fn vmp_apply_dft_to_dft_tmp_bytes( &self, res_size: usize, a_size: usize, b_rows: usize, b_cols_in: usize, b_cols_out: usize, b_size: usize, ) -> usize

Source§

impl<B: Backend> VmpPMatAlloc<B> for Module<B>

Source§

fn vmp_pmat_alloc( &self, rows: usize, cols_in: usize, cols_out: usize, size: usize, ) -> VmpPMatOwned<B>

Source§

impl<B: Backend> VmpPMatBytesOf for Module<B>

Source§

fn bytes_of_vmp_pmat( &self, rows: usize, cols_in: usize, cols_out: usize, size: usize, ) -> usize

Source§

impl<B> VmpPrepare<B> for Module<B>
where B: Backend + HalVmpImpl<B>,

Source§

fn vmp_prepare( &self, res: &mut VmpPMatBackendMut<'_, B>, a: &MatZnxBackendRef<'_, B>, scratch: &mut ScratchArena<'_, B>, )

Source§

impl<B> VmpPrepareTmpBytes for Module<B>
where B: Backend + HalVmpImpl<B>,

Source§

fn vmp_prepare_tmp_bytes( &self, rows: usize, cols_in: usize, cols_out: usize, size: usize, ) -> usize

Source§

impl<B> VmpZero<B> for Module<B>
where B: Backend + HalVmpImpl<B>,

Source§

fn vmp_zero(&self, res: &mut VmpPMatBackendMut<'_, B>)

Source§

impl<B: Backend> Send for Module<B>

Source§

impl<B: Backend> Sync for Module<B>

Auto Trait Implementations§

§

impl<B> Freeze for Module<B>

§

impl<B> RefUnwindSafe for Module<B>

§

impl<B> Unpin for Module<B>
where B: Unpin,

§

impl<B> UnsafeUnpin for Module<B>

§

impl<B> UnwindSafe for Module<B>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V