Basic HTML version of Foils prepared August 7 98

Foil 18 Avoiding the PURE Function in Mandelbrot

From DoD HPF Training -- 3. Parallel Constructs in HPF DoD Training and Others -- 1995-98. by Chuck Koelbel -- Rice University


k0 = 0
FORALL ( i=1:n, j=1:m )
  • x(i,j) = CMPLX((i-1)*1.0/(n-1),(j-1)*1.0/(m-1))
  • k(i,j) = 0
  • xtmp(i,j) = -x(i,j)
  • mask(i,j) = .TRUE.
END FORALL
DO WHILE (ANY(mask(1:n,1:m)) .AND. k0<1000)
  • FORALL ( i=1:n, j=1:m, mask(i,j))
    • xtmp(i,j) = xtmp(i,j)*xtmp(i,j)-x(i,j)
    • k(i,j) = k(i,j) + 1
    • mask(i,j) = ABS(xtmp(i,j))<2.0
  • END FORALL
  • k0 = k0 + 1
END DO



© 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