Fixes after meeting

This commit is contained in:
Jean-Philippe Bossuat
2025-07-11 12:29:49 +02:00
parent 38df06f7ab
commit 52a6a130a5
6 changed files with 188 additions and 151 deletions

View File

@@ -240,11 +240,11 @@ impl Scratch {
) -> (Vec<VecZnxDft<&mut [u8], B>>, &mut Self) {
let mut scratch: &mut Scratch = self;
let mut slice: Vec<VecZnxDft<&mut [u8], B>> = Vec::with_capacity(slice_size);
for _ in 0..slice_size{
for _ in 0..slice_size {
let (znx, new_scratch) = scratch.tmp_vec_znx_dft(module, cols, size);
scratch = new_scratch;
slice.push(znx);
};
}
(slice, scratch)
}
@@ -279,11 +279,11 @@ impl Scratch {
) -> (Vec<VecZnx<&mut [u8]>>, &mut Self) {
let mut scratch: &mut Scratch = self;
let mut slice: Vec<VecZnx<&mut [u8]>> = Vec::with_capacity(slice_size);
for _ in 0..slice_size{
for _ in 0..slice_size {
let (znx, new_scratch) = scratch.tmp_vec_znx(module, cols, size);
scratch = new_scratch;
slice.push(znx);
};
}
(slice, scratch)
}

View File

@@ -111,10 +111,10 @@ impl<D: AsMut<[u8]> + AsRef<[u8]>> VecZnx<D> {
}
}
pub fn rotate(&mut self, k: i64){
unsafe{
(0..self.cols()).for_each(|i|{
(0..self.size()).for_each(|j|{
pub fn rotate(&mut self, k: i64) {
unsafe {
(0..self.cols()).for_each(|i| {
(0..self.size()).for_each(|j| {
znx::znx_rotate_inplace_i64(self.n() as u64, k, self.at_mut_ptr(i, j));
});
})