arnaucube
arnaucube/poulpyPublic Self-hosted repository
add take ggsw slice
Pro7ech jeanphilippe.bossuat@gmail.com
Thu, 06 Nov 2025 19:01:21 +0100
commit

c32db7d9637bead4d71f25c983175038e4c3b7ba

parent

785bb46df20590562d20922353578c37ac25216d

1 files changed, 18 insertions(+), 0 deletions(-)

jump to
M poulpy-core/src/scratch.rs → poulpy-core/src/scratch.rs

@@ -155,6 +155,24 @@ scratch,

) } + fn take_ggsw_slice<A>( + &mut self, + size: usize, + infos: &A, + ) -> (Vec<GGSW<&mut [u8]>>, &mut Self) + where + A: GGSWInfos, + { + let mut scratch: &mut Self = self; + let mut cts: Vec<GGSW<&mut [u8]>> = Vec::with_capacity(size); + for _ in 0..size { + let (ct, new_scratch) = scratch.take_ggsw(infos); + scratch = new_scratch; + cts.push(ct) + } + (cts, scratch) + } + fn take_ggsw_prepared_slice<A, M>( &mut self, module: &M,