use crate::{ api::{ VecZnxDftAdd, VecZnxDftAddInplace, VecZnxDftAlloc, VecZnxDftAllocBytes, VecZnxDftApply, VecZnxDftCopy, VecZnxDftFromBytes, VecZnxDftSub, VecZnxDftSubInplace, VecZnxDftSubNegateInplace, VecZnxDftZero, VecZnxIdftApply, VecZnxIdftApplyConsume, VecZnxIdftApplyTmpA, VecZnxIdftApplyTmpBytes, }, layouts::{ Backend, Data, Module, Scratch, VecZnxBig, VecZnxBigToMut, VecZnxDft, VecZnxDftOwned, VecZnxDftToMut, VecZnxDftToRef, VecZnxToRef, }, oep::{ VecZnxDftAddImpl, VecZnxDftAddInplaceImpl, VecZnxDftAllocBytesImpl, VecZnxDftAllocImpl, VecZnxDftApplyImpl, VecZnxDftCopyImpl, VecZnxDftFromBytesImpl, VecZnxDftSubImpl, VecZnxDftSubInplaceImpl, VecZnxDftSubNegateInplaceImpl, VecZnxDftZeroImpl, VecZnxIdftApplyConsumeImpl, VecZnxIdftApplyImpl, VecZnxIdftApplyTmpAImpl, VecZnxIdftApplyTmpBytesImpl, }, }; impl VecZnxDftFromBytes for Module where B: Backend + VecZnxDftFromBytesImpl, { fn vec_znx_dft_from_bytes(&self, cols: usize, size: usize, bytes: Vec) -> VecZnxDftOwned { B::vec_znx_dft_from_bytes_impl(self.n(), cols, size, bytes) } } impl VecZnxDftAllocBytes for Module where B: Backend + VecZnxDftAllocBytesImpl, { fn vec_znx_dft_alloc_bytes(&self, cols: usize, size: usize) -> usize { B::vec_znx_dft_alloc_bytes_impl(self.n(), cols, size) } } impl VecZnxDftAlloc for Module where B: Backend + VecZnxDftAllocImpl, { fn vec_znx_dft_alloc(&self, cols: usize, size: usize) -> VecZnxDftOwned { B::vec_znx_dft_alloc_impl(self.n(), cols, size) } } impl VecZnxIdftApplyTmpBytes for Module where B: Backend + VecZnxIdftApplyTmpBytesImpl, { fn vec_znx_idft_apply_tmp_bytes(&self) -> usize { B::vec_znx_idft_apply_tmp_bytes_impl(self) } } impl VecZnxIdftApply for Module where B: Backend + VecZnxIdftApplyImpl, { fn vec_znx_idft_apply(&self, res: &mut R, res_col: usize, a: &A, a_col: usize, scratch: &mut Scratch) where R: VecZnxBigToMut, A: VecZnxDftToRef, { B::vec_znx_idft_apply_impl(self, res, res_col, a, a_col, scratch); } } impl VecZnxIdftApplyTmpA for Module where B: Backend + VecZnxIdftApplyTmpAImpl, { fn vec_znx_idft_apply_tmpa(&self, res: &mut R, res_col: usize, a: &mut A, a_col: usize) where R: VecZnxBigToMut, A: VecZnxDftToMut, { B::vec_znx_idft_apply_tmpa_impl(self, res, res_col, a, a_col); } } impl VecZnxIdftApplyConsume for Module where B: Backend + VecZnxIdftApplyConsumeImpl, { fn vec_znx_idft_apply_consume(&self, a: VecZnxDft) -> VecZnxBig where VecZnxDft: VecZnxDftToMut, { B::vec_znx_idft_apply_consume_impl(self, a) } } impl VecZnxDftApply for Module where B: Backend + VecZnxDftApplyImpl, { fn vec_znx_dft_apply(&self, step: usize, offset: usize, res: &mut R, res_col: usize, a: &A, a_col: usize) where R: VecZnxDftToMut, A: VecZnxToRef, { B::vec_znx_dft_apply_impl(self, step, offset, res, res_col, a, a_col); } } impl VecZnxDftAdd for Module where B: Backend + VecZnxDftAddImpl, { fn vec_znx_dft_add(&self, res: &mut R, res_col: usize, a: &A, a_col: usize, b: &D, b_col: usize) where R: VecZnxDftToMut, A: VecZnxDftToRef, D: VecZnxDftToRef, { B::vec_znx_dft_add_impl(self, res, res_col, a, a_col, b, b_col); } } impl VecZnxDftAddInplace for Module where B: Backend + VecZnxDftAddInplaceImpl, { fn vec_znx_dft_add_inplace(&self, res: &mut R, res_col: usize, a: &A, a_col: usize) where R: VecZnxDftToMut, A: VecZnxDftToRef, { B::vec_znx_dft_add_inplace_impl(self, res, res_col, a, a_col); } } impl VecZnxDftSub for Module where B: Backend + VecZnxDftSubImpl, { fn vec_znx_dft_sub(&self, res: &mut R, res_col: usize, a: &A, a_col: usize, b: &D, b_col: usize) where R: VecZnxDftToMut, A: VecZnxDftToRef, D: VecZnxDftToRef, { B::vec_znx_dft_sub_impl(self, res, res_col, a, a_col, b, b_col); } } impl VecZnxDftSubInplace for Module where B: Backend + VecZnxDftSubInplaceImpl, { fn vec_znx_dft_sub_inplace(&self, res: &mut R, res_col: usize, a: &A, a_col: usize) where R: VecZnxDftToMut, A: VecZnxDftToRef, { B::vec_znx_dft_sub_inplace_impl(self, res, res_col, a, a_col); } } impl VecZnxDftSubNegateInplace for Module where B: Backend + VecZnxDftSubNegateInplaceImpl, { fn vec_znx_dft_sub_negate_inplace(&self, res: &mut R, res_col: usize, a: &A, a_col: usize) where R: VecZnxDftToMut, A: VecZnxDftToRef, { B::vec_znx_dft_sub_negate_inplace_impl(self, res, res_col, a, a_col); } } impl VecZnxDftCopy for Module where B: Backend + VecZnxDftCopyImpl, { fn vec_znx_dft_copy(&self, step: usize, offset: usize, res: &mut R, res_col: usize, a: &A, a_col: usize) where R: VecZnxDftToMut, A: VecZnxDftToRef, { B::vec_znx_dft_copy_impl(self, step, offset, res, res_col, a, a_col); } } impl VecZnxDftZero for Module where B: Backend + VecZnxDftZeroImpl, { fn vec_znx_dft_zero(&self, res: &mut R) where R: VecZnxDftToMut, { B::vec_znx_dft_zero_impl(self, res); } }