Make FheUintBlocksPrepared allocation & encryption public

This commit is contained in:
Pro7ech
2025-10-28 11:24:22 +01:00
parent ade1608465
commit a2aecfd380

View File

@@ -93,8 +93,7 @@ where
} }
impl<T: UnsignedInteger, BE: Backend> FheUintBlocksPrepared<Vec<u8>, T, BE> { impl<T: UnsignedInteger, BE: Backend> FheUintBlocksPrepared<Vec<u8>, T, BE> {
#[allow(dead_code)] pub fn alloc<A, M>(module: &M, infos: &A) -> Self
pub(crate) fn alloc<A, M>(module: &M, infos: &A) -> Self
where where
A: GGSWInfos, A: GGSWInfos,
M: FheUintBlocksPreparedFactory<T, BE>, M: FheUintBlocksPreparedFactory<T, BE>,
@@ -102,8 +101,7 @@ impl<T: UnsignedInteger, BE: Backend> FheUintBlocksPrepared<Vec<u8>, T, BE> {
module.alloc_fhe_uint_blocks_prepared_from_infos(infos) module.alloc_fhe_uint_blocks_prepared_from_infos(infos)
} }
#[allow(dead_code)] pub fn alloc_with<M>(module: &M, base2k: Base2K, k: TorusPrecision, dnum: Dnum, dsize: Dsize, rank: Rank) -> Self
pub(crate) fn alloc_with<M>(module: &M, base2k: Base2K, k: TorusPrecision, dnum: Dnum, dsize: Dsize, rank: Rank) -> Self
where where
M: FheUintBlocksPreparedFactory<T, BE>, M: FheUintBlocksPreparedFactory<T, BE>,
{ {
@@ -153,7 +151,7 @@ where
} }
impl<D: DataMut, T: UnsignedInteger + ToBits, BE: Backend> FheUintBlocksPrepared<D, T, BE> { impl<D: DataMut, T: UnsignedInteger + ToBits, BE: Backend> FheUintBlocksPrepared<D, T, BE> {
pub(crate) fn encrypt_sk<M, S>( pub fn encrypt_sk<M, S>(
&mut self, &mut self,
module: &M, module: &M,
value: T, value: T,