diff --git a/.gitignore b/.gitignore index 98f2979..7cd589f 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,5 @@ /target /Cargo.lock .DS_Store +.idea /.vscode \ No newline at end of file diff --git a/benches/multithreading.rs b/benches/multithreading.rs index 20ce75e..4f9c642 100644 --- a/benches/multithreading.rs +++ b/benches/multithreading.rs @@ -37,7 +37,6 @@ fn dot(a: &[f64], b: &[f64]) -> f64 { /// sized slices which then get passed ot their own thread to compute the partial dot product. After all threads have /// finished the partial dot products will be summed to create the final result. fn dot_parallel(a: Arc>, b: Arc>, threads: usize) { - let mut pool = ThreadPool::with_limit(threads); // number of elements in each vector for each thread @@ -56,7 +55,7 @@ fn dot_parallel(a: Arc>, b: Arc>, threads: usize) { dot(a, b) }); } - + pool.join_all(); black_box(pool.get_results().iter().sum::()); diff --git a/src/lib.rs b/src/lib.rs index 35a42fb..2b26d05 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -1,4 +1,3 @@ - extern crate core; pub mod image;