This commit is contained in:
Jean-Philippe Bossuat
2025-02-04 17:13:46 +01:00
parent e4a976ec9e
commit a790ff37cc
14 changed files with 1097 additions and 683 deletions

View File

@@ -11,21 +11,13 @@ pub mod module;
#[allow(unused_imports)]
pub use module::*;
pub mod scalar;
#[allow(unused_imports)]
pub use scalar::*;
pub mod vec_znx;
#[allow(unused_imports)]
pub use vec_znx::*;
pub mod vec_znx_arithmetic;
pub mod vec_znx_big;
#[allow(unused_imports)]
pub use vec_znx_arithmetic::*;
pub mod vec_znx_big_arithmetic;
#[allow(unused_imports)]
pub use vec_znx_big_arithmetic::*;
pub use vec_znx_big::*;
pub mod vec_znx_dft;
#[allow(unused_imports)]
@@ -39,6 +31,22 @@ pub mod vmp;
#[allow(unused_imports)]
pub use vmp::*;
pub mod sampling;
#[allow(unused_imports)]
pub use sampling::*;
pub mod encoding;
#[allow(unused_imports)]
pub use encoding::*;
pub mod infos;
#[allow(unused_imports)]
pub use infos::*;
pub mod free;
#[allow(unused_imports)]
pub use free::*;
pub const GALOISGENERATOR: u64 = 5;
#[allow(dead_code)]
@@ -65,10 +73,3 @@ pub fn cast_u8_to_f64_slice(data: &mut [u8]) -> &[f64] {
let len: usize = data.len() / std::mem::size_of::<f64>();
unsafe { std::slice::from_raw_parts(ptr, len) }
}
/// This trait should be implemented by structs that point to
/// memory allocated through C.
pub trait Free {
// Frees the memory and self destructs.
fn free(self);
}