CSC/ECE 506 Spring 2010/ch 3 yl: Difference between revisions

From Expertiza_Wiki
Jump to navigation Jump to search
Line 8: Line 8:


===DOACROSS===
===DOACROSS===
'''for'''    i:=2:N-1'''do''' A(i):=[A(i-1) + A(i) + A(i+1)]/3; '''next''' i;
''''for'''    i:=2:N-1'''do''' A(i):=[A(i-1) + A(i) + A(i+1)]/3; '''next''' i;
'''forall''' i:=2:N-1 '''do''' A(i):=[A(i-1) + A(i) + A(i+1)]/3;
'''forall''' i:=2:N-1 '''do''' A(i):=[A(i-1) + A(i) + A(i+1)]/3;'


===DOPIPE===
===DOPIPE===

Revision as of 19:34, 20 February 2010

Supplement to Chapter 3: Support for parallel-programming models. Discuss how DOACROSS, DOPIPE, DOALL, etc. are implemented in packages such as Posix threads, Intel Thread Building Blocks, OpenMP 2.0 and 3.0.

Parallel-programming models

DOALL

for    i:=2:N-1 do A(i):=[A(i-1) + A(i) + A(i+1)]/3; next i;
forall i:=2:N-1 do A(i):=[A(i-1) + A(i) + A(i+1)]/3;

DOACROSS

'for i:=2:N-1do A(i):=[A(i-1) + A(i) + A(i+1)]/3; next i; forall i:=2:N-1 do A(i):=[A(i-1) + A(i) + A(i+1)]/3;'

DOPIPE

Implementation

References

  1. wikipedia: Parallel Computing