vmp & svp doc

This commit is contained in:
Jean-Philippe Bossuat
2025-02-04 10:51:11 +01:00
parent 12004c426a
commit e4a976ec9e
11 changed files with 759 additions and 500 deletions

View File

@@ -31,13 +31,13 @@ pub mod vec_znx_dft;
#[allow(unused_imports)]
pub use vec_znx_dft::*;
pub mod scalar_vector_product;
pub mod svp;
#[allow(unused_imports)]
pub use scalar_vector_product::*;
pub use svp::*;
pub mod vector_matrix_product;
pub mod vmp;
#[allow(unused_imports)]
pub use vector_matrix_product::*;
pub use vmp::*;
pub const GALOISGENERATOR: u64 = 5;
@@ -65,3 +65,10 @@ 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);
}