OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gcc.dg/] [graphite/] [id-22.c] - Blame information for rev 801

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 689 jeremybenn
typedef float rvec[3];
2
float calc_similar_ind (int nind, rvec x[])
3
{
4
  int i, j, d;
5
  float m, tm, xd, rd;
6
  for(j=0; j<nind; j++) {
7
    i = x[j][0];
8
    tm += m;
9
    for(d=0 ; d<3; d++) {
10
      xd = x[i][d] - x[i][d];
11
      rd += m * xd;
12
    }
13
  }
14
    return rd/tm;
15
}

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.