poulpy/poulpy-backend/src/cpu_spqlios/ntt120/vec_znx_dft.rs
poulpy-backend/src/cpu_spqlios/ntt120/vec_znx_dft.rsRaw
1use poulpy_hal::{
2 layouts::{Backend, VecZnxDftOwned},
3 oep::{VecZnxDftAllocBytesImpl, VecZnxDftAllocImpl},
4};
5
6use crate::cpu_spqlios::NTT120;
7
8unsafe impl VecZnxDftAllocBytesImpl<NTT120> for NTT120 {
9 fn vec_znx_dft_alloc_bytes_impl(n: usize, cols: usize, size: usize) -> usize {
10 NTT120::layout_prep_word_count() * n * cols * size * size_of::<i64>()
11 }
12}
13
14unsafe impl VecZnxDftAllocImpl<NTT120> for NTT120 {
15 fn vec_znx_dft_alloc_impl(n: usize, cols: usize, size: usize) -> VecZnxDftOwned<NTT120> {
16 VecZnxDftOwned::alloc(n, cols, size)
17 }
18}