mirror of
https://github.com/arnaucube/poulpy.git
synced 2026-02-10 21:26:41 +01:00
Various improvement to memory management and API
[module]: added enum for backend [VecZnx, VecZnxDft, VecZnxBig, VmpPMat]: added ptr to data [VecZnxBorrow]: removed [VecZnxAPI]: removed
This commit is contained in:
@@ -8,7 +8,6 @@ pub mod encoding;
|
||||
)]
|
||||
// Other modules and exports
|
||||
pub mod ffi;
|
||||
pub mod free;
|
||||
pub mod infos;
|
||||
pub mod module;
|
||||
pub mod sampling;
|
||||
@@ -20,7 +19,6 @@ pub mod vec_znx_dft;
|
||||
pub mod vmp;
|
||||
|
||||
pub use encoding::*;
|
||||
pub use free::*;
|
||||
pub use infos::*;
|
||||
pub use module::*;
|
||||
pub use sampling::*;
|
||||
@@ -124,11 +122,3 @@ pub fn alloc_aligned_custom<T>(size: usize, align: usize) -> Vec<T> {
|
||||
pub fn alloc_aligned<T>(size: usize) -> Vec<T> {
|
||||
alloc_aligned_custom::<T>(size, DEFAULTALIGN)
|
||||
}
|
||||
|
||||
fn alias_mut_slice_to_vec<T>(slice: &[T]) -> Vec<T> {
|
||||
unsafe {
|
||||
let ptr: *mut T = slice.as_ptr() as *mut T;
|
||||
let len: usize = slice.len();
|
||||
Vec::from_raw_parts(ptr, len, len)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user