move scratch trait requirement to be specific to method

This commit is contained in:
Pro7ech
2025-10-28 11:18:36 +01:00
parent 787504c230
commit ade1608465
2 changed files with 2 additions and 3 deletions

View File

@@ -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

View File

@@ -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);