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] - Rev 801

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

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;
}
 

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

powered by: WebSVN 2.1.0

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