mirror of
https://github.com/arnaucube/poulpy.git
synced 2026-02-10 13:16:44 +01:00
move scratch trait requirement to be specific to method
This commit is contained in:
@@ -19,7 +19,6 @@ where
|
|||||||
pub trait GGSWBlindRotation<T: UnsignedInteger, BE: Backend>
|
pub trait GGSWBlindRotation<T: UnsignedInteger, BE: Backend>
|
||||||
where
|
where
|
||||||
Self: GLWEBlindRotation<T, BE> + VecZnxAddScalarInplace + VecZnxNormalizeInplace<BE>,
|
Self: GLWEBlindRotation<T, BE> + VecZnxAddScalarInplace + VecZnxNormalizeInplace<BE>,
|
||||||
Scratch<BE>: ScratchTakeCore<BE>,
|
|
||||||
{
|
{
|
||||||
fn ggsw_to_ggsw_blind_rotation_tmp_bytes<R, K>(&self, res_infos: &R, k_infos: &K) -> usize
|
fn ggsw_to_ggsw_blind_rotation_tmp_bytes<R, K>(&self, res_infos: &R, k_infos: &K) -> usize
|
||||||
where
|
where
|
||||||
@@ -139,7 +138,6 @@ where
|
|||||||
pub trait GLWEBlindRotation<T: UnsignedInteger, BE: Backend>
|
pub trait GLWEBlindRotation<T: UnsignedInteger, BE: Backend>
|
||||||
where
|
where
|
||||||
Self: GLWECopy + GLWERotate<BE> + Cmux<BE>,
|
Self: GLWECopy + GLWERotate<BE> + Cmux<BE>,
|
||||||
Scratch<BE>: ScratchTakeCore<BE>,
|
|
||||||
{
|
{
|
||||||
fn glwe_to_glwe_blind_rotation_tmp_bytes<R, K>(&self, res_infos: &R, k_infos: &K) -> usize
|
fn glwe_to_glwe_blind_rotation_tmp_bytes<R, K>(&self, res_infos: &R, k_infos: &K) -> usize
|
||||||
where
|
where
|
||||||
|
|||||||
@@ -146,7 +146,6 @@ pub enum Node {
|
|||||||
pub trait Cmux<BE: Backend>
|
pub trait Cmux<BE: Backend>
|
||||||
where
|
where
|
||||||
Self: GLWEExternalProduct<BE> + GLWESub + GLWEAdd,
|
Self: GLWEExternalProduct<BE> + GLWESub + GLWEAdd,
|
||||||
Scratch<BE>: ScratchTakeCore<BE>,
|
|
||||||
{
|
{
|
||||||
fn cmux_tmp_bytes<R, A, B>(&self, res_infos: &R, a_infos: &A, b_infos: &B) -> usize
|
fn cmux_tmp_bytes<R, A, B>(&self, res_infos: &R, a_infos: &A, b_infos: &B) -> usize
|
||||||
where
|
where
|
||||||
@@ -163,6 +162,7 @@ where
|
|||||||
T: GLWEToRef,
|
T: GLWEToRef,
|
||||||
F: GLWEToRef,
|
F: GLWEToRef,
|
||||||
S: GGSWPreparedToRef<BE>,
|
S: GGSWPreparedToRef<BE>,
|
||||||
|
Scratch<BE>: ScratchTakeCore<BE>,
|
||||||
{
|
{
|
||||||
self.glwe_sub(res, t, f);
|
self.glwe_sub(res, t, f);
|
||||||
self.glwe_external_product_inplace(res, s, scratch);
|
self.glwe_external_product_inplace(res, s, scratch);
|
||||||
@@ -174,6 +174,7 @@ where
|
|||||||
R: GLWEToMut,
|
R: GLWEToMut,
|
||||||
A: GLWEToRef,
|
A: GLWEToRef,
|
||||||
S: GGSWPreparedToRef<BE>,
|
S: GGSWPreparedToRef<BE>,
|
||||||
|
Scratch<BE>: ScratchTakeCore<BE>,
|
||||||
{
|
{
|
||||||
self.glwe_sub_inplace(res, a);
|
self.glwe_sub_inplace(res, a);
|
||||||
self.glwe_external_product_inplace(res, s, scratch);
|
self.glwe_external_product_inplace(res, s, scratch);
|
||||||
|
|||||||
Reference in New Issue
Block a user