Absence of Loop-carried Memory Dependency with IVDEP Directive

For Itanium(TM)-based applications, the -ivdep_parallel option indicates there is absolutely no loop-carried memory dependency in the loop where IVDEP directive is specified. This technique is useful for some sparse matrix applications. For example,  the following loop  requires -ivdep_parallel in addition to the directive IVDEP to indicate there is no loop-carried dependencies.

#pragma ivdep

for (i=1; i<n; i++) {

   e[ix[2][i]] = e[ix[2][i]]+1.0;

   e[ix[3][i]] = e[ix[3][i]]+2.0;

}

The following example shows that using this option and the IVDEP directive ensures there is no loop-carried dependency for the store into a(). /a[] for C/

#pragma ivdep

for (j=0; j<n; j++) {

      a[b[j]]  =  a[b[j]] + 1;

}