Skip to content

rayon-rs/rayon-macro

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

rayon-macro

rayon-macro crate rayon-macro documentation minimum rustc 1.45 build status

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.

License

This project is licensed under either of

at your option.

About

Macros enabling parallelism using the rayon crate

Resources

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE-APACHE
MIT
LICENSE-MIT

Stars

Watchers

Forks

Packages

No packages published

Languages