We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4d6188a commit 1a93b2cCopy full SHA for 1a93b2c
benches/iter.rs
@@ -370,3 +370,23 @@ fn iter_axis_chunks_5_iter_sum(bench: &mut Bencher) {
370
.sum::<f32>()
371
});
372
}
373
+
374
+pub fn zip_mut_with(data: &Array3<f32>, out: &mut Array3<f32>) {
375
+ out.zip_mut_with(&data, |o, &i| {
376
+ *o = i;
377
+ });
378
+}
379
380
+#[bench]
381
+fn zip_mut_with_cc(b: &mut Bencher) {
382
+ let data: Array3<f32> = Array3::zeros((ISZ, ISZ, ISZ));
383
+ let mut out = Array3::zeros(data.dim());
384
+ b.iter(|| black_box(zip_mut_with(&data, &mut out)));
385
386
387
388
+fn zip_mut_with_ff(b: &mut Bencher) {
389
+ let data: Array3<f32> = Array3::zeros((ISZ, ISZ, ISZ).f());
390
+ let mut out = Array3::zeros(data.dim().f());
391
392
0 commit comments