next up previous contents index
Next: 5.5.3 Compiler macros or Up: 5.5 Compiler switches and Previous: 5.5.1 OpenMP   Contents   Index

5.5.2 Compiler directives

Some directives are inserted into the code to improve performance. They are only understood by the Intel compiler, though. In the following example, unrolling is enforced (or highly recommended) by the directive:

  do i3=m3,n3
    do i2=m2,n2
      do i1=m1,n1+1
         !DIR$ UNROLL
        do j=-1,1
          alpha_til_1(i1,j,i2,i3)=alpha0_til_1(i1,i_up_mi(i1,i2,i3)-i1+j,i2,i3)
        end do ! j
      end do ! i1
      !
      do i1=m1,n1+1
         !DIR$ UNROLL
        do j=-1,1
          alpha_til_2(i1,j,i2,i3)=alpha0_til_2(i1,i_up_pl(i1,i2,i3)-i1+j,i2,i3)
        end do ! j
      end do ! i1
    end do ! i2
  end do ! i3