mirror of
https://github.com/arnaucube/poulpy.git
synced 2026-02-10 21:26:41 +01:00
fix remaining issues before fixing tests
This commit is contained in:
@@ -198,7 +198,7 @@ where
|
||||
impl<B: Backend> TensorKeyPrepare<B> for Module<B> where Self: GLWESwitchingKeyPrepare<B> {}
|
||||
|
||||
impl<B: Backend> TensorKeyPrepared<Vec<u8>, B> {
|
||||
fn prepare_tmp_bytes<A, M>(&self, module: &M, infos: &A) -> usize
|
||||
pub fn prepare_tmp_bytes<A, M>(&self, module: &M, infos: &A) -> usize
|
||||
where
|
||||
A: GGLWEInfos,
|
||||
M: TensorKeyPrepare<B>,
|
||||
@@ -208,7 +208,7 @@ impl<B: Backend> TensorKeyPrepared<Vec<u8>, B> {
|
||||
}
|
||||
|
||||
impl<D: DataMut, B: Backend> TensorKeyPrepared<D, B> {
|
||||
fn prepare<O, M>(&mut self, module: &M, other: &O, scratch: &mut Scratch<B>)
|
||||
pub fn prepare<O, M>(&mut self, module: &M, other: &O, scratch: &mut Scratch<B>)
|
||||
where
|
||||
O: TensorKeyToRef,
|
||||
M: TensorKeyPrepare<B>,
|
||||
|
||||
@@ -18,7 +18,7 @@ pub struct GLWEPublicKeyPrepared<D: Data, B: Backend> {
|
||||
pub(crate) dist: Distribution,
|
||||
}
|
||||
|
||||
pub(crate) trait SetDist {
|
||||
pub trait SetDist {
|
||||
fn set_dist(&mut self, dist: Distribution);
|
||||
}
|
||||
|
||||
|
||||
@@ -63,7 +63,7 @@ where
|
||||
self.alloc_glwe_secret_prepared(infos.rank())
|
||||
}
|
||||
|
||||
fn bytes_of_glwe_secret(&self, rank: Rank) -> usize {
|
||||
fn bytes_of_glwe_secret_prepared(&self, rank: Rank) -> usize {
|
||||
self.bytes_of_svp_ppol(rank.into())
|
||||
}
|
||||
fn bytes_of_glwe_secret_prepared_from_infos<A>(&self, infos: &A) -> usize
|
||||
@@ -71,7 +71,7 @@ where
|
||||
A: GLWEInfos,
|
||||
{
|
||||
assert_eq!(self.ring_degree(), infos.n());
|
||||
self.bytes_of_glwe_secret(infos.rank())
|
||||
self.bytes_of_glwe_secret_prepared(infos.rank())
|
||||
}
|
||||
}
|
||||
|
||||
@@ -105,7 +105,7 @@ impl<B: Backend> GLWESecretPrepared<Vec<u8>, B> {
|
||||
where
|
||||
M: GLWESecretPreparedAlloc<B>,
|
||||
{
|
||||
module.bytes_of_glwe_secret(rank)
|
||||
module.bytes_of_glwe_secret_prepared(rank)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -172,7 +172,7 @@ impl<B: Backend> GLWEToLWESwitchingKeyPrepared<Vec<u8>, B> {
|
||||
}
|
||||
|
||||
impl<D: DataMut, B: Backend> GLWEToLWESwitchingKeyPrepared<D, B> {
|
||||
fn prepare<O, M>(&mut self, module: &M, other: &O, scratch: &mut Scratch<B>)
|
||||
pub fn prepare<O, M>(&mut self, module: &M, other: &O, scratch: &mut Scratch<B>)
|
||||
where
|
||||
O: GLWEToLWESwitchingKeyToRef,
|
||||
M: GLWEToLWESwitchingKeyPrepare<B>,
|
||||
|
||||
@@ -180,7 +180,7 @@ impl<B: Backend> LWESwitchingKeyPrepared<Vec<u8>, B> {
|
||||
}
|
||||
|
||||
impl<D: DataMut, B: Backend> LWESwitchingKeyPrepared<D, B> {
|
||||
fn prepare<O, M>(&mut self, module: &M, other: &O, scratch: &mut Scratch<B>)
|
||||
pub fn prepare<O, M>(&mut self, module: &M, other: &O, scratch: &mut Scratch<B>)
|
||||
where
|
||||
O: LWESwitchingKeyToRef,
|
||||
M: LWESwitchingKeyPrepare<B>,
|
||||
|
||||
@@ -179,7 +179,7 @@ impl<B: Backend> LWEToGLWESwitchingKeyPrepared<Vec<u8>, B> {
|
||||
}
|
||||
|
||||
impl<D: DataMut, B: Backend> LWEToGLWESwitchingKeyPrepared<D, B> {
|
||||
fn prepare<O, M>(&mut self, module: &M, other: &O, scratch: &mut Scratch<B>)
|
||||
pub fn prepare<O, M>(&mut self, module: &M, other: &O, scratch: &mut Scratch<B>)
|
||||
where
|
||||
O: LWEToGLWESwitchingKeyToRef,
|
||||
M: LWEToGLWESwitchingKeyPrepare<B>,
|
||||
|
||||
Reference in New Issue
Block a user