Crates.io | rayon-macro |
lib.rs | rayon-macro |
version | 0.2.0 |
source | src |
created_at | 2020-01-24 23:47:19.3435 |
updated_at | 2020-07-29 19:27:45.611308 |
description | Macros enabling parallelism using the rayon crate |
homepage | |
repository | https://github.com/rayon-rs/rayon-macro |
max_upload_size | |
id | 201690 |
size | 19,936 |
The rayon-macro
crate provides procedural macros to make it easier to
transform serial code into rayon
-enabled parallel code. For example,
the parallel!
macro can be used like this:
use rayon_macro::parallel;
parallel!(for i in 0..10 {
println!("iteration {}", i);
});
It will be expanded to something like this:
(0..10).into_par_iter().for_each(|i| {
println!("iteration {}", i);
});
Control-flow expressions in the body will also be transformed as needed.
This crate currently requires rustc 1.45.0
or greater.
This project is licensed under either of
at your option.