summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/graphite/id-22.c
blob: d825542158b7d3e485aec94efc2784cc57cc2044 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
typedef float rvec[3];
float calc_similar_ind (int nind, rvec x[])
{
  int i, j, d;
  float m, tm, xd, rd;
  for(j=0; j<nind; j++) {
    i = x[j][0];
    tm += m;
    for(d=0 ; d<3; d++) {
      xd = x[i][d] - x[i][d];
      rd += m * xd;
    }
  }
    return rd/tm;
}