Basic HTML version of Foils prepared
August 7 98
Foil 6 An Example of FORALL
From
DoD HPF Training -- 3. Parallel Constructs in HPF DoD Training and Others --
1995-98
.
by
Chuck Koelbel -- Rice University
1
Initially,
a = [0, 1, 2, 3, 4]
b = [0, 10, 20, 30, 40]
c = [-1, -1, -1, -1, -1]
2
FORALL ( i = 2:4 )
a(i) = a(i-1) + a(i+1)
c(i) = b(i) * a(i+1)
3
END FORALL
4
Afterwards,
a = [0, 2, 4, 6, 4]
b = [0, 10, 20, 30, 40]
c = [-1, 40, 120, 120, -1]
in Table To:
©
Northeast Parallel Architectures Center, Syracuse University, npac@npac.syr.edu
If you have any comments about this server, send e-mail to
webmaster@npac.syr.edu
.
Page produced by
wwwfoil
on Sun Aug 9 1998