collapsing not nested loops

The public comment period closed January 31, 2008. This forum is now locked (read only).
Locked
dmikh

collapsing not nested loops

Post by dmikh »

From the Draft (section 2.5.1) it may be not clear whether only nested loops can be associated in a loop construct by collapse clause. For example, will the following code be conforming and iterations of these two adjacent loops will be collapsed into one iteration space?

Code: Select all

  #pragma omp for collapse(2)
  for (i=1; i<10; i++)
    ;
  for (j=1; j<10; j++)
    ;

lfm
Posts: 135
Joined: Sun Oct 21, 2007 4:58 pm
Location: OpenMP ARB

Re: collapsing not nested loops

Post by lfm »

I think that it is clear in the draft. p.39 line 16 says "The loop construct is associated with a loop nest consisting of one or more loops that follow the directive."

Locked