This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Reduction Pattern ( Vectorization or Parallelization)


On Sun, Jul 5, 2015 at 1:57 PM, Ajit Kumar Agarwal
<ajit.kumar.agarwal@xilinx.com> wrote:
> 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?

I think the issue here is dependences of X(A[i]) as A[i] might be the same
for different i.

Richard.

> Thanks & Regards
> Ajit
>
>


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]