Code clean
[IRC.git] / Robust / src / Runtime / bamboo / multicorehelper.h
1 // NOTE: this file should be changed to be generated automatically
2
3 #ifndef BAMBOO_MULTICORE_HELPER_H
4 #define BAMBOO_MULTICORE_HELPER_H
5
6 #ifdef GC_1
7 // NUMCORES4GC = 1
8 static unsigned int gc_core2block[2] = {0,1};
9
10 static unsigned int gc_block2core[2] = { 0,  0};
11 #elif defined GC_2
12 // NUMCORES4GC = 2
13 static unsigned int gc_core2block[4] = {
14   0,3,  
15   1,2
16 };
17
18 static unsigned int gc_block2core[4] = {
19   0, 1, 
20   1, 0
21 };
22 #elif defined GC_4
23 // NUMCORES4GC = 4
24 static unsigned int gc_core2block[8] = {
25   0,7,  3,4,  
26   1,6,  2,5
27 };
28
29 static unsigned int gc_block2core[8] = {
30   0, 2, 3, 1,
31   1, 3, 2, 0
32 };
33 #elif defined GC_8
34 // NUMCORES4GC = 8
35 static unsigned int gc_core2block[16] = {
36   0,15,   3,12,   4,11,   7,8, 
37   1,14,   2,13,   5,10,   6,9
38 };
39
40 static unsigned int gc_block2core[16] = {
41   0,  4,  5,  1,  2,  6,  7,  3,
42   3,  7,  6,  2,  1,  5,  4,  0
43 };
44 #elif defined GC_16
45 // NUMCORES4GC = 16
46 static unsigned int gc_core2block[32] = {
47   0,31,   7,24,   8,23,  15,16,
48   1,30,   6,25,   9,22,  14,17,
49   2,29,   5,26,  10,21,  13,18,
50   3,28,   4,27,  11,20,  12,19
51 };
52
53 static unsigned int gc_block2core[32] = {
54   0,  4,  8, 12, 13,  9,  5,  1,
55   2,  6, 10, 14, 15, 11,  7,  3,
56   3,  7, 11, 15, 14, 10,  6,  2,
57   1,  5,  9, 13, 12,  8,  4,  0
58 };
59 #elif defined GC_32
60 // NUMCORES4GC = 32
61 static unsigned int gc_core2block[64] = {
62   0,63,  15,48,  16,47,  31,32,   
63   1,62,  14,49,  17,46,  30,33,
64   2,61,  13,50,  18,45,  29,34, 
65   3,60,  12,51,  19,44,  28,35,
66   4,59,  11,52,  20,43,  27,36,  
67   5,58,  10,53,  21,42,  26,37,
68   6,57,   9,54,  22,41,  25,38,  
69   7,56,   8,55,  23,40,  24,39
70 };
71
72 static unsigned int gc_block2core[64] = {
73   0,  4,  8, 12, 16, 20, 24, 28, 29, 25, 21, 17, 13,  9,  5,  1,
74   2,  6, 10, 14, 18, 22, 26, 30, 31, 27, 23, 19, 15, 11,  7,  3,
75   3,  7, 11, 15, 19, 23, 27, 31, 30, 26, 22, 18, 14, 10,  6,  2,
76   1,  5,  9, 13, 17, 21, 25, 29, 28, 24, 20, 16, 12,  8,  4,  0
77 };
78 #elif defined GC_48
79 // NUMCORES4GC = 50
80 static unsigned int gc_core2block[96] = {
81   0,95,  15,80,  16,79,  31,64,  32,63,  47,48,
82   1,94,  14,81,  17,78,  30,65,  33,62,  46,49,
83   2,93,  13,82,  18,77,  29,66,  34,61,  45,50,
84   3,92,  12,83,  19,76,  28,67,  35,60,  44,51,
85   4,91,  11,84,  20,75,  27,68,  36,59,  43,52,
86   5,90,  10,85,  21,74,  26,69,  37,58,  42,53,
87   6,89,   9,86,  22,73,  25,70,  38,57,  41,54,
88   7,88,   8,87,  23,72,  24,71,  39,56,  40,55
89 };
90
91 static unsigned int gc_block2core[96] = {
92   0,  6, 12, 18, 24, 30, 36, 42, 43, 37, 31, 25, 19, 13,  7,  1,
93   2,  8, 14, 20, 26, 32, 38, 44, 45, 39, 33, 27, 21, 15,  9,  3,
94   4, 10, 16, 22, 28, 34, 40, 46, 47, 41, 35, 29, 23, 17, 11,  5,
95   5, 11, 17, 23, 29, 35, 41, 47, 46, 40, 34, 28, 22, 16, 10,  4,
96   3,  9, 15, 21, 27, 33, 39, 45, 44, 38, 32, 26, 20, 14,  8,  2,
97   1,  7, 13, 19, 25, 31, 37, 43, 42, 36, 30, 24, 18, 12,  6,  0
98 };
99 #elif defined GC_50
100 // NUMCORES4GC = 50
101 static unsigned int gc_core2block[100] = {
102   0,99,  15,84,  16,83,  31,68,  32,67,  47,52,
103   1,98,  14,85,  17,82,  30,69,  33,66,  46,53,
104   2,97,  13,86,  18,81,  29,70,  34,65,  45,54,
105   3,96,  12,87,  19,80,  28,71,  35,64,  44,55,
106   4,95,  11,88,  20,79,  27,72,  36,63,  43,56,
107   5,94,  10,89,  21,78,  26,73,  37,62,  42,57,
108   6,93,   9,90,  22,77,  25,74,  38,61,  41,58,  48,51,
109   7,92,   8,91,  23,76,  24,75,  39,60,  40,59,  49,50
110 };
111
112 static unsigned int gc_block2core[100] = {
113   0,  6, 12, 18, 24, 30, 36, 43, 44, 37, 31, 25, 19, 13,  7,  1,
114   2,  8, 14, 20, 26, 32, 38, 45, 46, 39, 33, 27, 21, 15,  9,  3,
115   4, 10, 16, 22, 28, 34, 40, 47, 48, 41, 35, 29, 23, 17, 11,  5,
116                          42, 49, 49, 42,
117   5, 11, 17, 23, 29, 35, 41, 48, 47, 40, 34, 28, 22, 16, 10,  4,
118   3,  9, 15, 21, 27, 33, 39, 46, 45, 38, 32, 26, 20, 14,  8,  2,
119   1,  7, 13, 19, 25, 31, 37, 44, 43, 36, 30, 24, 18, 12,  6,  0
120 };
121 #elif defined GC_56
122 // NUMCORES4GC = 56
123 static unsigned int gc_core2block[112] = {
124   0,111,  15, 96,  16,95,  31,80,  32,79,  47,64,  48,63,
125   1,110,  14, 97,  17,94,  30,81,  33,78,  46,65,  49,62,
126   2,109,  13, 98,  18,93,  29,82,  34,77,  45,66,  50,61,
127   3,108,  12, 99,  19,92,  28,83,  35,76,  44,67,  51,60,
128   4,107,  11,100,  20,91,  27,84,  36,75,  43,68,  52,59,
129   5,106,  10,101,  21,90,  26,85,  37,74,  42,69,  53,58,
130   6,105,   9,102,  22,89,  25,86,  38,73,  41,70,  54,57,
131   7,104,   8,103,  23,88,  24,87,  39,72,  40,71,  55,56
132 };
133
134 static unsigned int gc_block2core[112] = {
135   0,  7, 14, 21, 28, 35, 42, 49, 50, 43, 36, 29, 22, 15,  8,  1,
136   2,  9, 16, 23, 30, 37, 44, 51, 52, 45, 38, 31, 24, 17, 10,  3,
137   4, 11, 18, 25, 32, 39, 46, 53, 54, 47, 40, 33, 26, 19, 12,  5,
138   6, 13, 20, 27, 34, 41, 48, 55, 55, 48, 41, 34, 27, 20, 13,  6,
139   5, 12, 19, 26, 33, 40, 47, 54, 53, 46, 39, 32, 25, 18, 11,  4,
140   3, 10, 17, 24, 31, 38, 45, 52, 51, 44, 37, 30, 23, 16,  9,  2,
141   1,  8, 15, 22, 29, 36, 43, 50, 49, 42, 35, 28, 21, 14,  7,  0
142 };
143 #elif defined GC_62
144 // NUMCORES4GC = 62
145 static unsigned int gc_core2block[124] = {
146   0,123,  15,108,  16,107,  31,92,  32,91,  47,76,
147   1,122,  14,109,  17,106,  30,93,  33,90,  46,77,  48,75,  61,62,
148   2,121,  13,110,  18,105,  29,94,  34,89,  45,78,  49,74,  60,63,
149   3,120,  12,111,  19,104,  28,95,  35,88,  44,79,  50,73,  59,64,
150   4,119,  11,112,  20,103,  27,96,  36,87,  43,80,  51,72,  58,65,
151   5,118,  10,113,  21,102,  26,97,  37,86,  42,81,  52,71,  57,66,
152   6,117,   9,114,  22,101,  25,98,  38,85,  41,82,  53,70,  56,67,
153   7,116,   8,115,  23,100,  24,99,  39,84,  40,83,  54,69,  55,68
154 };
155
156 static unsigned int gc_block2core[124] = {
157   0,  6, 14, 22, 30, 38, 46, 54, 55, 47, 39, 31, 23, 15,  7,  1,
158   2,  8, 16, 24, 32, 40, 48, 56, 57, 49, 41, 33, 25, 17,  9,  3,
159   4, 10, 18, 26, 34, 42, 50, 58, 59, 51, 43, 35, 27, 19, 11,  5,
160   12, 20, 28, 36, 44, 52, 60, 61, 53, 45, 37, 29, 21, 13,
161   13, 21, 29, 37, 45, 53, 61, 60, 52, 44, 36, 28, 20, 12,
162   5, 11, 19, 27, 35, 43, 51, 59, 58, 50, 42, 34, 26, 18, 10,  4,
163   3,  9, 17, 25, 33, 41, 49, 57, 56, 48, 40, 32, 24, 16,  8,  2,
164   1,  7, 15, 23, 31, 39, 47, 55, 54, 46, 38, 30, 22, 14,  6,  0
165 };
166 #endif
167
168 #endif // BAMBOO_MULTICORE_HELPER_H