Crates.io | parallel_operations |
lib.rs | parallel_operations |
version | 0.1.4 |
source | src |
created_at | 2024-11-18 21:33:31.556525 |
updated_at | 2024-11-19 02:12:18.696442 |
description | A library to perform binary operations in parallel using threads |
homepage | |
repository | https://github.com/jon429r/parallel_operations |
max_upload_size | |
id | 1452683 |
size | 14,261 |
This Rust library provides a set of parallel binary operations such as addition, multiplication, and more. The operations are designed to be computed concurrently using threads, leveraging the power of multiple CPU cores for faster performance.
To use the parallel_operations
crate in your project, follow these steps:
cargo add parallel_operations
use parallel_operations::parallel_binary_operation;
fn main() {
let data = vec![1, 2, 3, 4, 5];
// Parallel addition
let addition_result = parallel_binary_operation(data.clone(), |a, b| a + b);
println!("Addition result: {}", addition_result);
}