We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
FLoops.jl
FLoops.jl could be a nice options to implement multi-threading. It allows us to switch between serial and parallel computation.
using FLoops function bar(n, executor) X = zeros(n) @floop executor for i in 1:n sleep(0.1) if rand() < 0.3 X[i] = X[i] + 1 @reduce(k +=1) end end (X, k) end x, k = bar(20, SequentialEx()) sum(x) x, k = bar(20, ThreadedEx()) sum(x) @time bar(20, SequentialEx()) @time bar(20, ThreadedEx())
The text was updated successfully, but these errors were encountered:
we use currently Polyester.jl
Sorry, something went wrong.
No branches or pull requests
FLoops.jl
could be a nice options to implement multi-threading. It allows us to switch between serial and parallel computation.The text was updated successfully, but these errors were encountered: