This commit is contained in:
Pro7ech
2025-10-15 10:48:14 +02:00
parent a5df85170d
commit 008b800c01
74 changed files with 890 additions and 871 deletions

View File

@@ -227,16 +227,16 @@ where
impl<B: Backend> GLWESwitchingKeyAlloc for Module<B> where Self: GGLWEAlloc {}
impl GLWESwitchingKey<Vec<u8>> {
pub fn alloc_from_infos<A, B: Backend>(module: &Module<B>, infos: &A) -> Self
pub fn alloc_from_infos<A, M>(module: &M, infos: &A) -> Self
where
A: GGLWEInfos,
Module<B>: GLWESwitchingKeyAlloc,
M: GLWESwitchingKeyAlloc,
{
module.alloc_glwe_switching_key_from_infos(infos)
}
pub fn alloc<B: Backend>(
module: &Module<B>,
pub fn alloc<M>(
module: &M,
base2k: Base2K,
k: TorusPrecision,
rank_in: Rank,
@@ -245,21 +245,21 @@ impl GLWESwitchingKey<Vec<u8>> {
dsize: Dsize,
) -> Self
where
Module<B>: GLWESwitchingKeyAlloc,
M: GLWESwitchingKeyAlloc,
{
module.alloc_glwe_switching_key(base2k, k, rank_in, rank_out, dnum, dsize)
}
pub fn bytes_of_from_infos<A, B: Backend>(module: &Module<B>, infos: &A) -> usize
pub fn bytes_of_from_infos<A, M>(module: &M, infos: &A) -> usize
where
A: GGLWEInfos,
Module<B>: GLWESwitchingKeyAlloc,
M: GLWESwitchingKeyAlloc,
{
module.bytes_of_glwe_switching_key_from_infos(infos)
}
pub fn bytes_of<B: Backend>(
module: &Module<B>,
pub fn bytes_of<M>(
module: &M,
base2k: Base2K,
k: TorusPrecision,
rank_in: Rank,
@@ -268,7 +268,7 @@ impl GLWESwitchingKey<Vec<u8>> {
dsize: Dsize,
) -> usize
where
Module<B>: GLWESwitchingKeyAlloc,
M: GLWESwitchingKeyAlloc,
{
module.bytes_of_glwe_switching_key(base2k, k, rank_in, rank_out, dnum, dsize)
}