(v: Vec<usize>, threads: usize, max_in_flight: usize)
| 20 | |
| 21 | #[quickcheck] |
| 22 | fn map_vs_map_parallel_double(v: Vec<usize>, threads: usize, max_in_flight: usize) -> bool { |
| 23 | let m: Vec<_> = v.clone().into_iter().map(|x| x / 2).collect(); |
| 24 | let mp: Vec<_> = v |
| 25 | .clone() |
| 26 | .into_iter() |
| 27 | .parallel_map_custom( |
| 28 | |o| o.threads(threads % 32).buffer_size(max_in_flight % 128), |
| 29 | |x| x / 2, |
| 30 | ) |
| 31 | .parallel_map_custom( |
| 32 | |o| o.threads(threads % 32).buffer_size(max_in_flight % 128), |
| 33 | |x| x, |
| 34 | ) |
| 35 | .collect(); |
| 36 | |
| 37 | m == mp |
| 38 | } |
| 39 | |
| 40 | #[quickcheck] |
| 41 | fn map_vs_map_parallel_scoped_double(v: Vec<usize>, threads: usize, max_in_flight: usize) -> bool { |
nothing calls this directly
no test coverage detected