53.  INDEPENDENT 的一个实例

BACKWARDFORWARD


  • 初始化
    • a = [0,2,4,6,1,3,5,7]
      b = [6,5,4,3,2,3,4,5]
      c = [-1,-1,-1,-1,-1,-1,-1,-1]

    !HPF$ INDEPENDENT
       DO j = 1,3
      a(j) = a(b(j))
      c(a(j)) = a(j)*b(a(j))
    END DO

    • 结果得:
      a = [3,1,6,6,1,3,5,7]
      b = [6,5,4,3,2,3,4,5]
      c = [6,-1,12,-1,-1,18,-1,-1]


    Copyright: NPACT BACKWARDFORWARD