mirror of
https://github.com/arnaucube/poulpy.git
synced 2026-02-10 21:26:41 +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
24
poulpy-backend/src/cpu_spqlios/ntt120/svp_ppol.rs
Normal file
24
poulpy-backend/src/cpu_spqlios/ntt120/svp_ppol.rs
Normal file
@@ -0,0 +1,24 @@
|
||||
use poulpy_hal::{
|
||||
layouts::{Backend, SvpPPolOwned},
|
||||
oep::{SvpPPolAllocBytesImpl, SvpPPolAllocImpl, SvpPPolFromBytesImpl},
|
||||
};
|
||||
|
||||
use crate::cpu_spqlios::NTT120;
|
||||
|
||||
unsafe impl SvpPPolFromBytesImpl<Self> for NTT120 {
|
||||
fn svp_ppol_from_bytes_impl(n: usize, cols: usize, bytes: Vec<u8>) -> SvpPPolOwned<NTT120> {
|
||||
SvpPPolOwned::from_bytes(n, cols, bytes)
|
||||
}
|
||||
}
|
||||
|
||||
unsafe impl SvpPPolAllocImpl<Self> for NTT120 {
|
||||
fn svp_ppol_alloc_impl(n: usize, cols: usize) -> SvpPPolOwned<NTT120> {
|
||||
SvpPPolOwned::alloc(n, cols)
|
||||
}
|
||||
}
|
||||
|
||||
unsafe impl SvpPPolAllocBytesImpl<Self> for NTT120 {
|
||||
fn svp_ppol_alloc_bytes_impl(n: usize, cols: usize) -> usize {
|
||||
NTT120::layout_prep_word_count() * n * cols * size_of::<i64>()
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user