BivariateConvolution

Trait BivariateConvolution 

Source
pub trait BivariateConvolution<BE: Backend>{
    // Provided methods
    fn convolution_tmp_bytes(&self, b_size: usize) -> usize { ... }
    fn bivariate_convolution_add<R, A, B>(
        &self,
        k: i64,
        res: &mut R,
        res_col: usize,
        a: &A,
        a_col: usize,
        b: &B,
        b_col: usize,
        scratch: &mut Scratch<BE>,
    )
       where R: VecZnxDftToMut<BE>,
             A: VecZnxToRef,
             B: VecZnxDftToRef<BE> { ... }
    fn bivariate_convolution<R, A, B>(
        &self,
        k: i64,
        res: &mut R,
        res_col: usize,
        a: &A,
        a_col: usize,
        b: &B,
        b_col: usize,
        scratch: &mut Scratch<BE>,
    )
       where R: VecZnxDftToMut<BE>,
             A: VecZnxToRef,
             B: VecZnxDftToRef<BE> { ... }
}

Provided Methods§

Source

fn convolution_tmp_bytes(&self, b_size: usize) -> usize

Source

fn bivariate_convolution_add<R, A, B>( &self, k: i64, res: &mut R, res_col: usize, a: &A, a_col: usize, b: &B, b_col: usize, scratch: &mut Scratch<BE>, )
where R: VecZnxDftToMut<BE>, A: VecZnxToRef, B: VecZnxDftToRef<BE>,

Evaluates a bivariate convolution over Z[X, Y] / (X^N + 1) where Y = 2^-K over the selected columsn and stores the result on the selected column, scaled by 2^{k * Base2K}

§Example

a = [a00, a10, a20, a30] = (a00 * 2^-K + a01 * 2^-2K) + (a10 * 2^-K + a11 * 2^-2K) * X … [a01, a11, a21, a31]

b = [b00, b10, b20, b30] = (b00 * 2^-K + b01 * 2^-2K) + (b10 * 2^-K + b11 * 2^-2K) * X … [b01, b11, b21, b31]

If k = 0: res = [ 0, 0, 0, 0] = (r01 * 2^-2K + r02 * 2^-3K + r03 * 2^-4K + r04 * 2^-5K) + … [r01, r11, r21, r31] [r02, r12, r22, r32] [r03, r13, r23, r33] [r04, r14, r24, r34]

If k = 1: res = [r01, r11, r21, r31] = (r01 * 2^-K + r02 * 2^-2K + r03 * 2^-3K + r04 * 2^-4K + r05 * 2^-5K) + … [r02, r12, r22, r32] [r03, r13, r23, r33] [r04, r14, r24, r34] [r05, r15, r25, r35]

If k = -1: res = [ 0, 0, 0, 0] = (r01 * 2^-3K + r02 * 2^-4K + r03 * 2^-5K) + … [ 0, 0, 0, 0] [r01, r11, r21, r31] [r02, r12, r22, r32] [r03, r13, r23, r33]

If res.size() < a.size() + b.size() + 1 + k, result is truncated accordingly in the Y dimension.

Source

fn bivariate_convolution<R, A, B>( &self, k: i64, res: &mut R, res_col: usize, a: &A, a_col: usize, b: &B, b_col: usize, scratch: &mut Scratch<BE>, )
where R: VecZnxDftToMut<BE>, A: VecZnxToRef, B: VecZnxDftToRef<BE>,

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§