Is there a way to indicate local parallelism?


#1

With a sorting network, I can sort 4 values using 5 comparisons in three sequential groups.
The first two comparisons are internally independent, so ok to do in parallel. And so for the next two.

Is there a way to let Julia know a local sequence that is not a loop need not be sequential?


#2

You could write explicit SIMD code with SIMD.jl


#3

You could also look into using the @async and @sync macros. For example, you could write

@sync begin
    @async ...
    @async ...
end