mirror of
https://github.com/arnaucube/poulpy.git
synced 2026-02-10 21:26:41 +01:00
wip
This commit is contained in:
@@ -140,31 +140,31 @@ where
|
||||
}
|
||||
|
||||
impl TensorKeyCompressed<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>: TensorKeyCompressedAlloc,
|
||||
M: TensorKeyCompressedAlloc,
|
||||
{
|
||||
module.alloc_tensor_key_compressed_from_infos(infos)
|
||||
}
|
||||
|
||||
pub fn alloc<B: Backend>(module: Module<B>, base2k: Base2K, k: TorusPrecision, rank: Rank, dnum: Dnum, dsize: Dsize) -> Self
|
||||
pub fn alloc<M>(module: &M, base2k: Base2K, k: TorusPrecision, rank: Rank, dnum: Dnum, dsize: Dsize) -> Self
|
||||
where
|
||||
Module<B>: TensorKeyCompressedAlloc,
|
||||
M: TensorKeyCompressedAlloc,
|
||||
{
|
||||
module.alloc_tensor_key_compressed(base2k, k, rank, 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>: TensorKeyCompressedAlloc,
|
||||
M: TensorKeyCompressedAlloc,
|
||||
{
|
||||
module.bytes_of_tensor_key_compressed_from_infos(infos)
|
||||
}
|
||||
|
||||
pub fn bytes_of<B: Backend>(
|
||||
module: Module<B>,
|
||||
pub fn bytes_of<M>(
|
||||
module: &M,
|
||||
base2k: Base2K,
|
||||
k: TorusPrecision,
|
||||
rank: Rank,
|
||||
@@ -172,7 +172,7 @@ impl TensorKeyCompressed<Vec<u8>> {
|
||||
dsize: Dsize,
|
||||
) -> usize
|
||||
where
|
||||
Module<B>: TensorKeyCompressedAlloc,
|
||||
M: TensorKeyCompressedAlloc,
|
||||
{
|
||||
module.bytes_of_tensor_key_compressed(base2k, k, rank, dnum, dsize)
|
||||
}
|
||||
@@ -243,10 +243,10 @@ where
|
||||
impl<B: Backend> TensorKeyDecompress for Module<B> where Self: GLWESwitchingKeyDecompress {}
|
||||
|
||||
impl<D: DataMut> TensorKey<D> {
|
||||
pub fn decompress<O, B: Backend>(&mut self, module: &Module<B>, other: &O)
|
||||
pub fn decompress<O, M>(&mut self, module: &M, other: &O)
|
||||
where
|
||||
O: TensorKeyCompressedToRef,
|
||||
Module<B>: GLWESwitchingKeyDecompress,
|
||||
M: TensorKeyDecompress,
|
||||
{
|
||||
module.decompress_tensor_key(self, other);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user