parallel_task 0.6.0

A fast data parallelism library for Rust
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
use parallel_task::{map::ParallelMapIter, prelude::IntoParallelIter};


#[test]
fn string_test() {
    //This test has been setup since the original algorithms panicked when doing parallel processing
    // on Vec<String> and other types which do not have a fixed size
    let vec = (0..100000).map(|v|v.to_string()).collect::<Vec<_>>();

    let vec2 = vec.clone().into_parallel_iter().map(|v|v).collect::<Vec<_>>();

    assert_eq!(vec.len(),vec2.len());
}