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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gcc.dg/] [graphite/] [id-16.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
int transformation[(2*19 - 1) * (2*19 - 1)][8];
2
 
3
const int transformation2[8][2][2] = {
4
  {{1, 0}, {0, 1}},
5
  {{0, 1}, {-1, 0}},
6
  {{-1, 0}, {0, -1}},
7
  {{0, -1}, {1, 0}},
8
  {{0, -1}, {-1, 0}},
9
  {{-1, 0}, {0, 1}},
10
  {{0, 1}, {1, 0}},
11
  {{1, 0}, {0, -1}}
12
};
13
 
14
void
15
transformation_init (void)
16
{
17
  int k;
18
  int dx;
19
  int dy;
20
 
21
  for (k = 0; k < 8; k++)
22
    {
23
      for (dy = -19 + 1; dy <= 19 - 1; dy++)
24
        {
25
          for (dx = -19 + 1; dx <= 19 - 1; dx++)
26
            {
27
              int tx;
28
              int ty;
29
              do
30
                {
31
                  *&tx =
32
                    transformation2[k][0][0] * (dx) +
33
                    transformation2[k][0][1] * (dy);
34
                  *&ty =
35
                    transformation2[k][1][0] * (dx) +
36
                    transformation2[k][1][1] * (dy);
37
                }
38
              while (0);
39
              transformation[((dy + 19 - 1) * (2 * 19 - 1) +
40
                              (dx + 19 - 1))][k] = ((tx) * (19 + 1) + (ty));
41
            }
42
        }
43
    }
44
}

powered by: WebSVN 2.1.0

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