Skip to content

Commit 6d7dd68

Browse files
Use nested Zip to not create temporary array
Co-authored-by: Adam Reichold <[email protected]>
1 parent 7733b94 commit 6d7dd68

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/linalg/impl_linalg.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -727,7 +727,9 @@ where
727727
Zip::from(out.exact_chunks_mut((dimbr, dimbc)))
728728
.and(a)
729729
.for_each(|out, &a| {
730-
(a * b).assign_to(out);
730+
Zip::from(out).and(b).for_each(|out, &b| {
731+
*out = MaybeUninit::new(a * b);
732+
})
731733
});
732734
unsafe { out.assume_init() }
733735
}

0 commit comments

Comments
 (0)