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