mirror of
https://github.com/arnaucube/poulpy.git
synced 2026-02-10 05:06:44 +01:00
Fixes after meeting
This commit is contained in:
@@ -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)
|
||||
}
|
||||
|
||||
|
||||
@@ -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));
|
||||
});
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user