mirror of
https://github.com/arnaucube/poulpy.git
synced 2026-02-10 13:16:44 +01:00
Crates io (#76)
* crates re-organisation * fixed typo in layout & added test for vmp_apply * updated dependencies
This commit is contained in:
committed by
GitHub
parent
dce4d82706
commit
a1de248567
18
poulpy-backend/src/cpu_spqlios/ntt120/vec_znx_dft.rs
Normal file
18
poulpy-backend/src/cpu_spqlios/ntt120/vec_znx_dft.rs
Normal file
@@ -0,0 +1,18 @@
|
||||
use poulpy_hal::{
|
||||
layouts::{Backend, VecZnxDftOwned},
|
||||
oep::{VecZnxDftAllocBytesImpl, VecZnxDftAllocImpl},
|
||||
};
|
||||
|
||||
use crate::cpu_spqlios::NTT120;
|
||||
|
||||
unsafe impl VecZnxDftAllocBytesImpl<NTT120> for NTT120 {
|
||||
fn vec_znx_dft_alloc_bytes_impl(n: usize, cols: usize, size: usize) -> usize {
|
||||
NTT120::layout_prep_word_count() * n * cols * size * size_of::<i64>()
|
||||
}
|
||||
}
|
||||
|
||||
unsafe impl VecZnxDftAllocImpl<NTT120> for NTT120 {
|
||||
fn vec_znx_dft_alloc_impl(n: usize, cols: usize, size: usize) -> VecZnxDftOwned<NTT120> {
|
||||
VecZnxDftOwned::alloc(n, cols, size)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user