Changes

Jump to: navigation, search

GPU621/The Chapel Programming Language

No change in size, 17:16, 1 December 2020
Parallel Iterators
'''Standalone parallel iterators:''' implement non-zippered forall loops.
 
===== Leader-follower iterator =====
 
forall (a, b, c) in zip(A, B, C) do
//in here, A is the leader; and A, B, C is followers
 
'''leader iterator''' will create the parallel tasks for its forall loop and set iterations to each parallel task.
 
'''follower iterator''' will take input and iterate over it; create opposite results in order.
An example code:
for (i,idVar) in zip(0..n, fibonacci(n)) do
writeln("#", i, " - ", idVar);
 
===== Leader-follower iterator =====
 
forall (a, b, c) in zip(A, B, C) do
//in here, A is the leader; and A, B, C is followers
 
'''leader iterator''' will create the parallel tasks for its forall loop and set iterations to each parallel task.
 
'''follower iterator''' will take input and iterate over it; create opposite results in order.
=== Task Parallelism ===
25
edits

Navigation menu