use crate::{ hal::{ api::{ZnxInfos, ZnxSliceSize, ZnxView}, layouts::{Data, DataRef, VecZnxDft, VecZnxDftBytesOf, VecZnxDftOwned}, oep::{VecZnxDftAllocBytesImpl, VecZnxDftAllocImpl}, }, implementation::cpu_spqlios::module_ntt120::NTT120, }; const VEC_ZNX_DFT_NTT120_WORDSIZE: usize = 4; impl ZnxSliceSize for VecZnxDft { fn sl(&self) -> usize { VEC_ZNX_DFT_NTT120_WORDSIZE * self.n() * self.cols() } } impl VecZnxDftBytesOf for VecZnxDft { fn bytes_of(n: usize, cols: usize, size: usize) -> usize { VEC_ZNX_DFT_NTT120_WORDSIZE * n * cols * size * size_of::() } } impl ZnxView for VecZnxDft { type Scalar = i64; } unsafe impl VecZnxDftAllocBytesImpl for NTT120 { fn vec_znx_dft_alloc_bytes_impl(n: usize, cols: usize, size: usize) -> usize { VecZnxDft::, NTT120>::bytes_of(n, cols, size) } } unsafe impl VecZnxDftAllocImpl for NTT120 { fn vec_znx_dft_alloc_impl(n: usize, cols: usize, size: usize) -> VecZnxDftOwned { VecZnxDftOwned::alloc(n, cols, size) } }