Next: The INDEPENDENT Directive
Up: Data Parallel Execution
Previous: Pure Subroutine Example
Multiple Instructions Multiple Data,
REAL FUNCTION F(x,i) ! PURE
IMPLICIT NONE
REAL, INTENT(IN) :: x ! element
INTEGER, INTENT(IN) :: i ! index
IF (x > 0.0) THEN
F = x*x
ELSEIF (i==1 .OR. i==n) THEN
F = 0.0
ELSE
F = x
END IF
END FUNCTION F
- different processors perform different tasks,
- used as alternative to WHERE or FORALL.
For more information, click here
Next: The INDEPENDENT Directive
Up: Data Parallel Execution
Previous: Pure Subroutine Example
©University of Liverpool, 1997
Wed May 28 23:37:18 BST 1997Not for commercial use.