mirror of
https://github.com/arnaucube/poulpy.git
synced 2026-02-10 13:16:44 +01:00
Merge remote-tracking branch 'origin/main'
This commit is contained in:
@@ -178,8 +178,6 @@ where
|
|||||||
let res: &mut GLWESecret<&mut [u8]> = &mut res.to_mut();
|
let res: &mut GLWESecret<&mut [u8]> = &mut res.to_mut();
|
||||||
let a: &GLWESecret<&[u8]> = &a.to_ref();
|
let a: &GLWESecret<&[u8]> = &a.to_ref();
|
||||||
|
|
||||||
println!("res.rank: {} a.rank: {}", res.rank(), a.rank());
|
|
||||||
|
|
||||||
assert_eq!(res.rank(), GLWESecretTensor::pairs(a.rank().into()) as u32);
|
assert_eq!(res.rank(), GLWESecretTensor::pairs(a.rank().into()) as u32);
|
||||||
assert_eq!(res.n(), self.n() as u32);
|
assert_eq!(res.n(), self.n() as u32);
|
||||||
assert_eq!(a.n(), self.n() as u32);
|
assert_eq!(a.n(), self.n() as u32);
|
||||||
|
|||||||
@@ -19,6 +19,12 @@ pub struct FheUintBlocks<D: Data, T: UnsignedInteger> {
|
|||||||
pub(crate) _phantom: PhantomData<T>,
|
pub(crate) _phantom: PhantomData<T>,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
impl<D: DataRef, T: UnsignedInteger> FheUintBlocks<D, T> {
|
||||||
|
pub fn blocks(&self) -> &Vec<GLWE<D>> {
|
||||||
|
&self.blocks
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
impl<D: DataRef, T: UnsignedInteger> LWEInfos for FheUintBlocks<D, T> {
|
impl<D: DataRef, T: UnsignedInteger> LWEInfos for FheUintBlocks<D, T> {
|
||||||
fn base2k(&self) -> poulpy_core::layouts::Base2K {
|
fn base2k(&self) -> poulpy_core::layouts::Base2K {
|
||||||
self.blocks[0].base2k()
|
self.blocks[0].base2k()
|
||||||
|
|||||||
@@ -24,6 +24,12 @@ pub struct FheUintBlocksPrepared<D: Data, T: UnsignedInteger, B: Backend> {
|
|||||||
pub(crate) _phantom: PhantomData<T>,
|
pub(crate) _phantom: PhantomData<T>,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
impl<D: Data, T: UnsignedInteger, B: Backend> FheUintBlocksPrepared<D, T, B> {
|
||||||
|
pub fn blocks(&self) -> &Vec<GGSWPrepared<D, B>> {
|
||||||
|
&self.blocks
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
impl<T: UnsignedInteger, BE: Backend> FheUintBlocksPreparedFactory<T, BE> for Module<BE> where
|
impl<T: UnsignedInteger, BE: Backend> FheUintBlocksPreparedFactory<T, BE> for Module<BE> where
|
||||||
Self: Sized + GGSWPreparedFactory<BE>
|
Self: Sized + GGSWPreparedFactory<BE>
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user