Reduction Pattern ( Vectorization or Parallelization)
Ajit Kumar Agarwal
ajit.kumar.agarwal@xilinx.com
Sun Jul 5 11:58:00 GMT 2015
All:
The scalar and array reduction patterns can be identified if the result of commutative updates
Is applied to the same scalar or array variables on the LHS with +, *, Min or Max. Thus the reduction pattern identified with
the commutative update help in vectorization or parallelization.
For the following code
For(j = 0; j <= N;j++)
{
y = d[j];
For( I = 0 ; I <8 ; i++)
X(a[i]) = X(a[i]) + c[i] * y;
}
Fig(1).
For the above code with the reduction pattern on X with respect to the outer loop exhibits the commutative updates on + can be identified
In gcc as reduction pattern with respect to outer loops. I wondering whether this can be identified as reduction pattern which can reduce to vectorized
Code because of the X is indexed by another array as thus the access of X is not affine expression.
Does the above code can be identified as reduction pattern and transform to the vectorized or parallelize code.
Thoughts?
Thanks & Regards
Ajit
More information about the Gcc
mailing list