(v: Vec<usize>, threads: usize, max_in_flight: usize)
| 5 | |
| 6 | #[quickcheck] |
| 7 | fn map_vs_map_parallel(v: Vec<usize>, threads: usize, max_in_flight: usize) -> bool { |
| 8 | let m: Vec<_> = v.clone().into_iter().map(|x| x / 2).collect(); |
| 9 | let mp: Vec<_> = v |
| 10 | .clone() |
| 11 | .into_iter() |
| 12 | .parallel_map_custom( |
| 13 | |o| o.threads(threads % 32).buffer_size(max_in_flight % 128), |
| 14 | |x| x / 2, |
| 15 | ) |
| 16 | .collect(); |
| 17 | |
| 18 | m == mp |
| 19 | } |
| 20 | |
| 21 | #[quickcheck] |
| 22 | fn map_vs_map_parallel_double(v: Vec<usize>, threads: usize, max_in_flight: usize) -> bool { |
nothing calls this directly
no test coverage detected