This commit is contained in:
Pro7ech
2025-10-14 23:39:16 +02:00
parent 72dca47cbe
commit 779e02acc4
94 changed files with 784 additions and 1688 deletions

View File

@@ -176,7 +176,7 @@ impl<B: Backend> AutomorphismKeyPrepared<Vec<u8>, B> {
}
}
pub trait AutomorphismKeyPrepare<B: Backend>
pub trait PrepareAutomorphismKey<B: Backend>
where
Self: GLWESwitchingKeyPrepare<B>,
{
@@ -197,7 +197,7 @@ where
}
}
impl<B: Backend> AutomorphismKeyPrepare<B> for Module<B> where Module<B>: GLWESwitchingKeyPrepare<B> {}
impl<B: Backend> PrepareAutomorphismKey<B> for Module<B> where Module<B>: GLWESwitchingKeyPrepare<B> {}
impl<B: Backend> AutomorphismKeyPrepared<Vec<u8>, B> {
pub fn prepare_tmp_bytes(&self, module: &Module<B>) -> usize
@@ -212,7 +212,7 @@ impl<D: DataMut, B: Backend> AutomorphismKeyPrepared<D, B> {
pub fn prepare<O>(&mut self, module: &Module<B>, other: &O, scratch: &mut Scratch<B>)
where
O: AutomorphismKeyToRef + GetAutomorphismGaloisElement,
Module<B>: AutomorphismKeyPrepare<B>,
Module<B>: PrepareAutomorphismKey<B>,
{
module.prepare_automorphism_key(self, other, scratch);
}

View File

@@ -1,5 +1,5 @@
use poulpy_hal::{
api::{VmpPMatAlloc, VmpPMatAllocBytes, VmpPrepare, VmpPrepareTmpBytes},
api::{VmpPMatAlloc, VmpPMatBytesOf, VmpPrepare, VmpPrepareTmpBytes},
layouts::{Backend, Data, DataMut, DataRef, Module, Scratch, VmpPMat, VmpPMatToMut, VmpPMatToRef, ZnxInfos},
};
@@ -59,7 +59,7 @@ impl<D: Data, B: Backend> GGLWEInfos for GGLWEPrepared<D, B> {
pub trait GGLWEPreparedAlloc<B: Backend>
where
Self: GetDegree + VmpPMatAlloc<B> + VmpPMatAllocBytes,
Self: GetDegree + VmpPMatAlloc<B> + VmpPMatBytesOf,
{
fn alloc_gglwe_prepared(
&self,
@@ -130,7 +130,7 @@ where
dsize.0,
);
self.vmp_pmat_bytes_of(dnum.into(), rank_in.into(), (rank_out + 1).into(), size)
self.bytes_of_vmp_pmat(dnum.into(), rank_in.into(), (rank_out + 1).into(), size)
}
fn bytes_of_gglwe_prepared_from_infos<A>(&self, infos: &A) -> usize
@@ -149,7 +149,7 @@ where
}
}
impl<B: Backend> GGLWEPreparedAlloc<B> for Module<B> where Module<B>: GetDegree + VmpPMatAlloc<B> + VmpPMatAllocBytes {}
impl<B: Backend> GGLWEPreparedAlloc<B> for Module<B> where Module<B>: GetDegree + VmpPMatAlloc<B> + VmpPMatBytesOf {}
impl<B: Backend> GGLWEPrepared<Vec<u8>, B>
where

View File

@@ -95,7 +95,7 @@ where
}
}
fn glwe_switching_key_prepared_alloc_from_infos<A>(&self, infos: &A) -> GLWESwitchingKeyPrepared<Vec<u8>, B>
fn alloc_glwe_switching_key_prepared_from_infos<A>(&self, infos: &A) -> GLWESwitchingKeyPrepared<Vec<u8>, B>
where
A: GGLWEInfos,
{
@@ -121,7 +121,7 @@ where
self.bytes_of_gglwe_prepared(base2k, k, rank_in, rank_out, dnum, dsize)
}
fn glwe_switching_key_prepared_bytes_of_from_infos<A>(&self, infos: &A) -> usize
fn bytes_of_glwe_switching_key_prepared_from_infos<A>(&self, infos: &A) -> usize
where
A: GGLWEInfos,
{
@@ -146,7 +146,7 @@ where
where
A: GGLWEInfos,
{
module.glwe_switching_key_prepared_alloc_from_infos(infos)
module.alloc_glwe_switching_key_prepared_from_infos(infos)
}
pub fn alloc(
@@ -165,7 +165,7 @@ where
where
A: GGLWEInfos,
{
module.glwe_switching_key_prepared_bytes_of_from_infos(infos)
module.bytes_of_glwe_switching_key_prepared_from_infos(infos)
}
pub fn bytes_of(

View File

@@ -1,5 +1,5 @@
use poulpy_hal::{
api::{VmpPMatAlloc, VmpPMatAllocBytes, VmpPrepare, VmpPrepareTmpBytes},
api::{VmpPMatAlloc, VmpPMatBytesOf, VmpPrepare, VmpPrepareTmpBytes},
layouts::{Backend, Data, DataMut, DataRef, Module, Scratch, VmpPMat, VmpPMatToMut, VmpPMatToRef, ZnxInfos},
};
@@ -51,7 +51,7 @@ impl<D: Data, B: Backend> GGSWInfos for GGSWPrepared<D, B> {
pub trait GGSWPreparedAlloc<B: Backend>
where
Self: GetDegree + VmpPMatAlloc<B> + VmpPMatAllocBytes,
Self: GetDegree + VmpPMatAlloc<B> + VmpPMatBytesOf,
{
fn alloc_ggsw_prepared(
&self,
@@ -117,7 +117,7 @@ where
dsize.0,
);
self.vmp_pmat_bytes_of(dnum.into(), (rank + 1).into(), (rank + 1).into(), size)
self.bytes_of_vmp_pmat(dnum.into(), (rank + 1).into(), (rank + 1).into(), size)
}
fn bytes_of_ggsw_prepared_from_infos<A>(&self, infos: &A) -> usize
@@ -135,7 +135,7 @@ where
}
}
impl<B: Backend> GGSWPreparedAlloc<B> for Module<B> where Module<B>: GetDegree + VmpPMatAlloc<B> + VmpPMatAllocBytes {}
impl<B: Backend> GGSWPreparedAlloc<B> for Module<B> where Module<B>: GetDegree + VmpPMatAlloc<B> + VmpPMatBytesOf {}
impl<B: Backend> GGSWPrepared<Vec<u8>, B>
where

View File

@@ -1,5 +1,5 @@
use poulpy_hal::{
api::{VecZnxDftAlloc, VecZnxDftAllocBytes, VecZnxDftApply},
api::{VecZnxDftAlloc, VecZnxDftApply, VecZnxDftBytesOf},
layouts::{Backend, Data, DataMut, DataRef, Module, VecZnxDft, VecZnxDftToMut, VecZnxDftToRef, ZnxInfos},
};
@@ -52,7 +52,7 @@ impl<D: Data, B: Backend> GLWEInfos for GLWEPublicKeyPrepared<D, B> {
pub trait GLWEPublicKeyPreparedAlloc<B: Backend>
where
Self: GetDegree + VecZnxDftAlloc<B> + VecZnxDftAllocBytes,
Self: GetDegree + VecZnxDftAlloc<B> + VecZnxDftBytesOf,
{
fn alloc_glwe_public_key_prepared(&self, base2k: Base2K, k: TorusPrecision, rank: Rank) -> GLWEPublicKeyPrepared<Vec<u8>, B> {
GLWEPublicKeyPrepared {
@@ -71,7 +71,7 @@ where
}
fn bytes_of_glwe_public_key_prepared(&self, base2k: Base2K, k: TorusPrecision, rank: Rank) -> usize {
self.vec_znx_dft_bytes_of((rank + 1).into(), k.0.div_ceil(base2k.0) as usize)
self.bytes_of_vec_znx_dft((rank + 1).into(), k.0.div_ceil(base2k.0) as usize)
}
fn bytes_of_glwe_public_key_prepared_from_infos<A>(&self, infos: &A) -> usize
@@ -82,7 +82,7 @@ where
}
}
impl<B: Backend> GLWEPublicKeyPreparedAlloc<B> for Module<B> where Self: VecZnxDftAlloc<B> + VecZnxDftAllocBytes {}
impl<B: Backend> GLWEPublicKeyPreparedAlloc<B> for Module<B> where Self: VecZnxDftAlloc<B> + VecZnxDftBytesOf {}
impl<B: Backend> GLWEPublicKeyPrepared<Vec<u8>, B>
where

View File

@@ -1,5 +1,5 @@
use poulpy_hal::{
api::{SvpPPolAlloc, SvpPPolAllocBytes, SvpPrepare},
api::{SvpPPolAlloc, SvpPPolBytesOf, SvpPrepare},
layouts::{Backend, Data, DataMut, DataRef, Module, SvpPPol, SvpPPolToMut, SvpPPolToRef, ZnxInfos},
};
@@ -47,7 +47,7 @@ impl<D: Data, B: Backend> GLWEInfos for GLWESecretPrepared<D, B> {
pub trait GLWESecretPreparedAlloc<B: Backend>
where
Self: GetDegree + SvpPPolAllocBytes + SvpPPolAlloc<B>,
Self: GetDegree + SvpPPolBytesOf + SvpPPolAlloc<B>,
{
fn alloc_glwe_secret_prepared(&self, rank: Rank) -> GLWESecretPrepared<Vec<u8>, B> {
GLWESecretPrepared {
@@ -64,7 +64,7 @@ where
}
fn bytes_of_glwe_secret(&self, rank: Rank) -> usize {
self.svp_ppol_bytes_of(rank.into())
self.bytes_of_svp_ppol(rank.into())
}
fn bytes_of_glwe_secret_from_infos<A>(&self, infos: &A) -> usize
where
@@ -75,7 +75,7 @@ where
}
}
impl<B: Backend> GLWESecretPreparedAlloc<B> for Module<B> where Self: GetDegree + SvpPPolAllocBytes + SvpPPolAlloc<B> {}
impl<B: Backend> GLWESecretPreparedAlloc<B> for Module<B> where Self: GetDegree + SvpPPolBytesOf + SvpPPolAlloc<B> {}
impl<B: Backend> GLWESecretPrepared<Vec<u8>, B>
where

View File

@@ -57,7 +57,7 @@ pub trait GLWEToLWESwitchingKeyPreparedAlloc<B: Backend>
where
Self: GLWESwitchingKeyPreparedAlloc<B>,
{
fn glwe_to_lwe_switching_key_prepared_alloc(
fn alloc_glwe_to_lwe_switching_key_prepared(
&self,
base2k: Base2K,
k: TorusPrecision,
@@ -66,7 +66,7 @@ where
) -> GLWEToLWESwitchingKeyPrepared<Vec<u8>, B> {
GLWEToLWESwitchingKeyPrepared(self.alloc_glwe_switching_key_prepared(base2k, k, rank_in, Rank(1), dnum, Dsize(1)))
}
fn glwe_to_lwe_switching_key_prepared_alloc_from_infos<A>(&self, infos: &A) -> GLWEToLWESwitchingKeyPrepared<Vec<u8>, B>
fn alloc_glwe_to_lwe_switching_key_prepared_from_infos<A>(&self, infos: &A) -> GLWEToLWESwitchingKeyPrepared<Vec<u8>, B>
where
A: GGLWEInfos,
{
@@ -80,14 +80,14 @@ where
1,
"dsize > 1 is not supported for GLWEToLWESwitchingKeyPrepared"
);
self.glwe_to_lwe_switching_key_prepared_alloc(infos.base2k(), infos.k(), infos.rank_in(), infos.dnum())
self.alloc_glwe_to_lwe_switching_key_prepared(infos.base2k(), infos.k(), infos.rank_in(), infos.dnum())
}
fn glwe_to_lwe_switching_key_prepared_bytes_of(&self, base2k: Base2K, k: TorusPrecision, rank_in: Rank, dnum: Dnum) -> usize {
fn bytes_of_glwe_to_lwe_switching_key_prepared(&self, base2k: Base2K, k: TorusPrecision, rank_in: Rank, dnum: Dnum) -> usize {
self.bytes_of_glwe_switching_key_prepared(base2k, k, rank_in, Rank(1), dnum, Dsize(1))
}
fn glwe_to_lwe_switching_key_prepared_bytes_of_from_infos<A>(&self, infos: &A) -> usize
fn bytes_of_glwe_to_lwe_switching_key_prepared_from_infos<A>(&self, infos: &A) -> usize
where
A: GGLWEInfos,
{
@@ -101,7 +101,7 @@ where
1,
"dsize > 1 is not supported for GLWEToLWESwitchingKeyPrepared"
);
self.glwe_to_lwe_switching_key_prepared_bytes_of(infos.base2k(), infos.k(), infos.rank_in(), infos.dnum())
self.bytes_of_glwe_to_lwe_switching_key_prepared(infos.base2k(), infos.k(), infos.rank_in(), infos.dnum())
}
}
@@ -115,22 +115,22 @@ where
where
A: GGLWEInfos,
{
module.glwe_to_lwe_switching_key_prepared_alloc_from_infos(infos)
module.alloc_glwe_to_lwe_switching_key_prepared_from_infos(infos)
}
pub fn alloc(module: &Module<B>, base2k: Base2K, k: TorusPrecision, rank_in: Rank, dnum: Dnum) -> Self {
module.glwe_to_lwe_switching_key_prepared_alloc(base2k, k, rank_in, dnum)
module.alloc_glwe_to_lwe_switching_key_prepared(base2k, k, rank_in, dnum)
}
pub fn bytes_of_from_infos<A>(module: &Module<B>, infos: &A) -> usize
where
A: GGLWEInfos,
{
module.glwe_to_lwe_switching_key_prepared_bytes_of_from_infos(infos)
module.bytes_of_glwe_to_lwe_switching_key_prepared_from_infos(infos)
}
pub fn bytes_of(module: &Module<B>, base2k: Base2K, k: TorusPrecision, rank_in: Rank, dnum: Dnum) -> usize {
module.glwe_to_lwe_switching_key_prepared_bytes_of(base2k, k, rank_in, dnum)
module.bytes_of_glwe_to_lwe_switching_key_prepared(base2k, k, rank_in, dnum)
}
}
@@ -138,14 +138,14 @@ pub trait GLWEToLWESwitchingKeyPrepare<B: Backend>
where
Self: GLWESwitchingKeyPrepare<B>,
{
fn glwe_to_lwe_switching_key_prepare_tmp_bytes<A>(&self, infos: &A)
fn prepare_glwe_to_lwe_switching_key_tmp_bytes<A>(&self, infos: &A)
where
A: GGLWEInfos,
{
self.prepare_glwe_switching_key_tmp_bytes(infos);
}
fn glwe_to_lwe_switching_key_prepare<R, O>(&self, res: &mut R, other: &O, scratch: &mut Scratch<B>)
fn prepare_glwe_to_lwe_switching_key<R, O>(&self, res: &mut R, other: &O, scratch: &mut Scratch<B>)
where
R: GLWEToLWESwitchingKeyPreparedToMut<B>,
O: GLWEToLWESwitchingKeyToRef,
@@ -162,7 +162,7 @@ impl<B: Backend> GLWEToLWESwitchingKeyPrepared<Vec<u8>, B> {
A: GGLWEInfos,
Module<B>: GLWEToLWESwitchingKeyPrepare<B>,
{
module.glwe_to_lwe_switching_key_prepare_tmp_bytes(infos);
module.prepare_glwe_to_lwe_switching_key_tmp_bytes(infos);
}
}
@@ -172,7 +172,7 @@ impl<D: DataMut, B: Backend> GLWEToLWESwitchingKeyPrepared<D, B> {
O: GLWEToLWESwitchingKeyToRef,
Module<B>: GLWEToLWESwitchingKeyPrepare<B>,
{
module.glwe_to_lwe_switching_key_prepare(self, other, scratch);
module.prepare_glwe_to_lwe_switching_key(self, other, scratch);
}
}

View File

@@ -65,7 +65,7 @@ where
LWESwitchingKeyPrepared(self.alloc_glwe_switching_key_prepared(base2k, k, Rank(1), Rank(1), dnum, Dsize(1)))
}
fn lwe_switching_key_prepared_alloc_from_infos<A>(&self, infos: &A) -> LWESwitchingKeyPrepared<Vec<u8>, B>
fn alloc_lwe_switching_key_prepared_from_infos<A>(&self, infos: &A) -> LWESwitchingKeyPrepared<Vec<u8>, B>
where
A: GGLWEInfos,
{
@@ -87,11 +87,11 @@ where
self.alloc_lwe_switching_key_prepared(infos.base2k(), infos.k(), infos.dnum())
}
fn lwe_switching_key_prepared_bytes_of(&self, base2k: Base2K, k: TorusPrecision, dnum: Dnum) -> usize {
fn bytes_of_lwe_switching_key_prepared(&self, base2k: Base2K, k: TorusPrecision, dnum: Dnum) -> usize {
self.bytes_of_glwe_switching_key_prepared(base2k, k, Rank(1), Rank(1), dnum, Dsize(1))
}
fn lwe_switching_key_prepared_bytes_of_from_infos<A>(&self, infos: &A) -> usize
fn bytes_of_lwe_switching_key_prepared_from_infos<A>(&self, infos: &A) -> usize
where
A: GGLWEInfos,
{
@@ -110,7 +110,7 @@ where
1,
"rank_out > 1 is not supported for LWESwitchingKey"
);
self.lwe_switching_key_prepared_bytes_of(infos.base2k(), infos.k(), infos.dnum())
self.bytes_of_lwe_switching_key_prepared(infos.base2k(), infos.k(), infos.dnum())
}
}
@@ -124,7 +124,7 @@ where
where
A: GGLWEInfos,
{
module.lwe_switching_key_prepared_alloc_from_infos(infos)
module.alloc_lwe_switching_key_prepared_from_infos(infos)
}
pub fn alloc(module: &Module<B>, base2k: Base2K, k: TorusPrecision, dnum: Dnum) -> Self {
@@ -135,11 +135,11 @@ where
where
A: GGLWEInfos,
{
module.lwe_switching_key_prepared_bytes_of_from_infos(infos)
module.bytes_of_lwe_switching_key_prepared_from_infos(infos)
}
pub fn bytes_of(module: &Module<B>, base2k: Base2K, k: TorusPrecision, dnum: Dnum) -> usize {
module.lwe_switching_key_prepared_bytes_of(base2k, k, dnum)
module.bytes_of_lwe_switching_key_prepared(base2k, k, dnum)
}
}
@@ -147,13 +147,13 @@ pub trait LWESwitchingKeyPrepare<B: Backend>
where
Self: GLWESwitchingKeyPrepare<B>,
{
fn lwe_switching_key_prepare_tmp_bytes<A>(&self, infos: &A)
fn prepare_lwe_switching_key_tmp_bytes<A>(&self, infos: &A)
where
A: GGLWEInfos,
{
self.prepare_glwe_switching_key_tmp_bytes(infos);
}
fn lwe_switching_key_prepare<R, O>(&self, res: &mut R, other: &O, scratch: &mut Scratch<B>)
fn prepare_lwe_switching_key<R, O>(&self, res: &mut R, other: &O, scratch: &mut Scratch<B>)
where
R: LWESwitchingKeyPreparedToMut<B>,
O: LWESwitchingKeyToRef,
@@ -170,7 +170,7 @@ impl<B: Backend> LWESwitchingKeyPrepared<Vec<u8>, B> {
A: GGLWEInfos,
Module<B>: LWESwitchingKeyPrepare<B>,
{
module.lwe_switching_key_prepare_tmp_bytes(infos);
module.prepare_lwe_switching_key_tmp_bytes(infos);
}
}
@@ -180,7 +180,7 @@ impl<D: DataMut, B: Backend> LWESwitchingKeyPrepared<D, B> {
O: LWESwitchingKeyToRef,
Module<B>: LWESwitchingKeyPrepare<B>,
{
module.lwe_switching_key_prepare(self, other, scratch);
module.prepare_lwe_switching_key(self, other, scratch);
}
}

View File

@@ -58,7 +58,7 @@ pub trait LWEToGLWESwitchingKeyPreparedAlloc<B: Backend>
where
Self: GLWESwitchingKeyPreparedAlloc<B>,
{
fn lwe_to_glwe_switching_key_prepared_alloc(
fn alloc_lwe_to_glwe_switching_key_prepared(
&self,
base2k: Base2K,
k: TorusPrecision,
@@ -67,7 +67,7 @@ where
) -> LWEToGLWESwitchingKeyPrepared<Vec<u8>, B> {
LWEToGLWESwitchingKeyPrepared(self.alloc_glwe_switching_key_prepared(base2k, k, Rank(1), rank_out, dnum, Dsize(1)))
}
fn lwe_to_glwe_switching_key_prepared_alloc_from_infos<A>(&self, infos: &A) -> LWEToGLWESwitchingKeyPrepared<Vec<u8>, B>
fn alloc_lwe_to_glwe_switching_key_prepared_from_infos<A>(&self, infos: &A) -> LWEToGLWESwitchingKeyPrepared<Vec<u8>, B>
where
A: GGLWEInfos,
{
@@ -81,10 +81,10 @@ where
1,
"dsize > 1 is not supported for LWEToGLWESwitchingKey"
);
self.lwe_to_glwe_switching_key_prepared_alloc(infos.base2k(), infos.k(), infos.rank_out(), infos.dnum())
self.alloc_lwe_to_glwe_switching_key_prepared(infos.base2k(), infos.k(), infos.rank_out(), infos.dnum())
}
fn lwe_to_glwe_switching_key_prepared_bytes_of(
fn bytes_of_lwe_to_glwe_switching_key_prepared(
&self,
base2k: Base2K,
k: TorusPrecision,
@@ -94,7 +94,7 @@ where
self.bytes_of_glwe_switching_key_prepared(base2k, k, Rank(1), rank_out, dnum, Dsize(1))
}
fn lwe_to_glwe_switching_key_prepared_bytes_of_from_infos<A>(&self, infos: &A) -> usize
fn bytes_of_lwe_to_glwe_switching_key_prepared_from_infos<A>(&self, infos: &A) -> usize
where
A: GGLWEInfos,
{
@@ -108,7 +108,7 @@ where
1,
"dsize > 1 is not supported for LWEToGLWESwitchingKey"
);
self.lwe_to_glwe_switching_key_prepared_bytes_of(infos.base2k(), infos.k(), infos.rank_out(), infos.dnum())
self.bytes_of_lwe_to_glwe_switching_key_prepared(infos.base2k(), infos.k(), infos.rank_out(), infos.dnum())
}
}
@@ -122,22 +122,22 @@ where
where
A: GGLWEInfos,
{
module.lwe_to_glwe_switching_key_prepared_alloc_from_infos(infos)
module.alloc_lwe_to_glwe_switching_key_prepared_from_infos(infos)
}
pub fn alloc(module: &Module<B>, base2k: Base2K, k: TorusPrecision, rank_out: Rank, dnum: Dnum) -> Self {
module.lwe_to_glwe_switching_key_prepared_alloc(base2k, k, rank_out, dnum)
module.alloc_lwe_to_glwe_switching_key_prepared(base2k, k, rank_out, dnum)
}
pub fn bytes_of_from_infos<A>(module: &Module<B>, infos: &A) -> usize
where
A: GGLWEInfos,
{
module.lwe_to_glwe_switching_key_prepared_bytes_of_from_infos(infos)
module.bytes_of_lwe_to_glwe_switching_key_prepared_from_infos(infos)
}
pub fn bytes_of(module: &Module<B>, base2k: Base2K, k: TorusPrecision, rank_out: Rank, dnum: Dnum) -> usize {
module.lwe_to_glwe_switching_key_prepared_bytes_of(base2k, k, rank_out, dnum)
module.bytes_of_lwe_to_glwe_switching_key_prepared(base2k, k, rank_out, dnum)
}
}
@@ -145,14 +145,14 @@ pub trait LWEToGLWESwitchingKeyPrepare<B: Backend>
where
Self: GLWESwitchingKeyPrepare<B>,
{
fn lwe_to_glwe_switching_key_prepare_tmp_bytes<A>(&self, infos: &A)
fn prepare_lwe_to_glwe_switching_key_tmp_bytes<A>(&self, infos: &A)
where
A: GGLWEInfos,
{
self.prepare_glwe_switching_key_tmp_bytes(infos);
}
fn lwe_to_glwe_switching_key_prepare<R, O>(&self, res: &mut R, other: &O, scratch: &mut Scratch<B>)
fn prepare_lwe_to_glwe_switching_key<R, O>(&self, res: &mut R, other: &O, scratch: &mut Scratch<B>)
where
R: LWEToGLWESwitchingKeyPreparedToMut<B>,
O: LWEToGLWESwitchingKeyToRef,
@@ -169,7 +169,7 @@ impl<B: Backend> LWEToGLWESwitchingKeyPrepared<Vec<u8>, B> {
A: GGLWEInfos,
Module<B>: LWEToGLWESwitchingKeyPrepare<B>,
{
module.lwe_to_glwe_switching_key_prepare_tmp_bytes(infos);
module.prepare_lwe_to_glwe_switching_key_tmp_bytes(infos);
}
}
@@ -179,7 +179,7 @@ impl<D: DataMut, B: Backend> LWEToGLWESwitchingKeyPrepared<D, B> {
O: LWEToGLWESwitchingKeyToRef,
Module<B>: LWEToGLWESwitchingKeyPrepare<B>,
{
module.lwe_to_glwe_switching_key_prepare(self, other, scratch);
module.prepare_lwe_to_glwe_switching_key(self, other, scratch);
}
}