next up previous contents
Next: Array Sorting Functions Up: HPF Intrinsics and Library Previous: Prefix and Suffix Functions

SEGMENT and EXCLUSIVE

SEGMENT: apply the function to sections, for example,

  S       =  (/T,T,T, F,F, T,T, F, T,T/)
  !            -----  ---  ---  -  ---
  SUM_PREFIX((/1,2,3, 4,5, 6,1, 2, 3,4/),SEGMENT=S) =
             (/1,3,6, 4,9, 6,7, 2, 3,7/)

EXCLUSIVE: scalar LOGICAL. If .FALSE. (default) then each element takes part in operation for its position, otherwise it does not and the first scanned element has identity value.

  PRODUCT_PREFIX((/1,2,3,4/), EXCLUSIVE=.TRUE.) = 
                 (/1,1,2,6/)
  SUM_PREFIX((/1,2,3,4/), EXCLUSIVE=.TRUE.) = 
             (/0,1,3,6/)

For more information, click here gif


next up previous contents
Next: Array Sorting Functions Up: HPF Intrinsics and Library Previous: Prefix and Suffix Functions

Adam Marshall ©University of Liverpool, 1996
Fri Dec 6 18:56:08 GMT 1996
Not for commercial use.