JuliaFolds / FLoops.jl

Fast sequential, threaded, and distributed for-loops for Julia—fold for humans™

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

dummy "executor" for sequential (single-thread)

tpapp opened this issue · comments

Suppose I want to allow the user to run something like

 function floop_map!(f, ys, xs, ex = ThreadedEx())
       @floop ex for i in eachindex(ys, xs)
           @inbounds ys[i] = f(xs[i])
       end
       return ys
   end
end

without threads (ie sequentially). Is there a "placeholder" executor I can use for this purpose?

From the documentation, I believe SequentialEx() is what you are looking for. See the Executors section: https://juliahub.com/docs/FLoops/99zMn/0.1.10/tutorials/parallel/#tutorials-executor