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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-stable/] [gcc-4.5.1/] [gcc/] [testsuite/] [gcc.c-torture/] [compile/] [920723-1.c] - Blame information for rev 859

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

Line No. Rev Author Line
1 297 jeremybenn
#if defined(STACK_SIZE) && STACK_SIZE < 65536
2
# define GITT_SIZE 75
3
#endif
4
 
5
#ifndef GITT_SIZE
6
# define GITT_SIZE 150
7
#endif
8
 
9
typedef struct {
10
  double x, y;
11
} vector_t;
12
double sqrt();
13
f(int count,vector_t*pos,double r,double *rho)
14
{
15
  int i, j, miny, maxy, hy;
16
  float help, d;
17
  int gitt[GITT_SIZE][GITT_SIZE];
18
  int *data = (int *)malloc(count*sizeof(int));
19
  for (i = 0; i < count; i++)
20
    rho[i] = 0;
21
  for (i = 1; i < count; i++)
22
    for (hy = miny; hy<= maxy; hy++)
23
      while(j >=0) {
24
        d = pos[i].y - pos[j].y;
25
        if ( d <= r) {
26
          d = sqrt(d);
27
          rho[i] += help;
28
        }
29
      }
30
}
31
 

powered by: WebSVN 2.1.0

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