[Omp] Canonical form for for loop?
Richard Henderson
rth at twiddle.net
Thu Oct 20 01:16:40 PDT 2005
On Thu, Oct 20, 2005 at 04:46:32AM +0000, NovaElf wrote:
> Does this means that initexpr can take functions; but endexpr and increxpr
> cannot?
They can take functions, but the functions *must* result in the same
value every loop iteration. That's what "loop invariant" means.
> int i = 2;
> int j;
> #pragma omp flor
> for (j = i; j < 10 * i; j ++)
> {
> }
> Is the above valid?
Yes.
r~
More information about the Omp
mailing list