diff options
| author | Sebastiano Tronto <sebastiano.tronto@gmail.com> | 2021-11-11 21:37:34 +0100 |
|---|---|---|
| committer | Sebastiano Tronto <sebastiano.tronto@gmail.com> | 2021-11-11 21:37:34 +0100 |
| commit | 3568412f8f230774d0d11d7ed1c897424f95d3ef (patch) | |
| tree | 77223792d8c925a9b1fc32b3f4341e943b5f8209 /src/pruning_tables.c | |
| parent | 67e1b5e6e6a2c917a2fe58a37a1382c982b1e5c5 (diff) | |
| download | nissy-3568412f8f230774d0d11d7ed1c897424f95d3ef.tar.gz nissy-3568412f8f230774d0d11d7ed1c897424f95d3ef.zip | |
Rewritten from scratch. Welocme nissy 2.0!
Diffstat (limited to '')
| -rw-r--r-- | src/pruning_tables.c | 483 |
1 files changed, 0 insertions, 483 deletions
diff --git a/src/pruning_tables.c b/src/pruning_tables.c deleted file mode 100644 index 8936b99..0000000 --- a/src/pruning_tables.c +++ /dev/null | |||
| @@ -1,483 +0,0 @@ | |||
| 1 | #include <stdint.h> | ||
| 2 | #include "pruning_tables.h" | ||
| 3 | #include "moves.h" | ||
| 4 | |||
| 5 | /* The data contained in e.g. eofb pruning table is the same that is contained | ||
| 6 | * in eolr pruning table and so on. For small tables the memory wasted is not | ||
| 7 | * too much and it makes things easier. I may change this when I implement | ||
| 8 | * bigger tables. */ | ||
| 9 | int eofb_pruning_table[pow2to11]; | ||
| 10 | int eorl_pruning_table[pow2to11]; | ||
| 11 | int eoud_pruning_table[pow2to11]; | ||
| 12 | int coud_pruning_table[pow3to7]; | ||
| 13 | int cofb_pruning_table[pow3to7]; | ||
| 14 | int corl_pruning_table[pow3to7]; | ||
| 15 | int cp_pruning_table[factorial8]; | ||
| 16 | |||
| 17 | int eorl_from_eofb_pruning_table[pow2to11]; | ||
| 18 | int eoud_from_eofb_pruning_table[pow2to11]; | ||
| 19 | int eoud_from_eorl_pruning_table[pow2to11]; | ||
| 20 | int eofb_from_eorl_pruning_table[pow2to11]; | ||
| 21 | int eofb_from_eoud_pruning_table[pow2to11]; | ||
| 22 | int eorl_from_eoud_pruning_table[pow2to11]; | ||
| 23 | |||
| 24 | int coud_from_eofb_pruning_table[pow3to7]; | ||
| 25 | int coud_from_eorl_pruning_table[pow3to7]; | ||
| 26 | int cofb_from_eorl_pruning_table[pow3to7]; | ||
| 27 | int cofb_from_eoud_pruning_table[pow3to7]; | ||
| 28 | int corl_from_eoud_pruning_table[pow3to7]; | ||
| 29 | int corl_from_eofb_pruning_table[pow3to7]; | ||
| 30 | |||
| 31 | int cp_drud_pruning_table[factorial8]; | ||
| 32 | int cp_drfb_pruning_table[factorial8]; | ||
| 33 | int cp_drrl_pruning_table[factorial8]; | ||
| 34 | int epud_pruning_table[factorial8]; | ||
| 35 | int epfb_pruning_table[factorial8]; | ||
| 36 | int eprl_pruning_table[factorial8]; | ||
| 37 | |||
| 38 | int cp_htr_pruning_table[factorial8]; | ||
| 39 | |||
| 40 | int cpud_to_htr_pruning_table[factorial8]; | ||
| 41 | int cpfb_to_htr_pruning_table[factorial8]; | ||
| 42 | int cprl_to_htr_pruning_table[factorial8]; | ||
| 43 | |||
| 44 | |||
| 45 | /* About 1Mb each */ | ||
| 46 | int8_t eofb_epose_pruning_table[pow2to11][binom12on4]; | ||
| 47 | int8_t eorl_eposs_pruning_table[pow2to11][binom12on4]; | ||
| 48 | int8_t eoud_eposm_pruning_table[pow2to11][binom12on4]; | ||
| 49 | |||
| 50 | /* About 4.5Mb each */ | ||
| 51 | int8_t eofb_coud_pruning_table[pow2to11][pow3to7]; | ||
| 52 | int8_t eofb_corl_pruning_table[pow2to11][pow3to7]; | ||
| 53 | int8_t eorl_coud_pruning_table[pow2to11][pow3to7]; | ||
| 54 | int8_t eorl_cofb_pruning_table[pow2to11][pow3to7]; | ||
| 55 | int8_t eoud_cofb_pruning_table[pow2to11][pow3to7]; | ||
| 56 | int8_t eoud_corl_pruning_table[pow2to11][pow3to7]; | ||
| 57 | |||
| 58 | /* About 1Mb each */ | ||
| 59 | int8_t coud_epose_from_eofb_pruning_table[pow3to7][binom12on4]; | ||
| 60 | int8_t cofb_eposs_from_eorl_pruning_table[pow3to7][binom12on4]; | ||
| 61 | int8_t corl_eposm_from_eoud_pruning_table[pow3to7][binom12on4]; | ||
| 62 | int8_t coud_epose_from_eorl_pruning_table[pow3to7][binom12on4]; | ||
| 63 | int8_t cofb_eposs_from_eoud_pruning_table[pow3to7][binom12on4]; | ||
| 64 | int8_t corl_eposm_from_eofb_pruning_table[pow3to7][binom12on4]; | ||
| 65 | |||
| 66 | |||
| 67 | /* Firs one is 88Mb, second one is 71Mb */ | ||
| 68 | int8_t cp_co_pruning_table[factorial8][pow3to7]; | ||
| 69 | int8_t triple_eo_pruning_table[pow2to11][binom12on4*binom8on4]; | ||
| 70 | |||
| 71 | int initialized_small = 0; | ||
| 72 | int initialized_directdr = 0; | ||
| 73 | int initialized_drfromeo = 0; | ||
| 74 | int initialized_huge = 0; | ||
| 75 | |||
| 76 | void init_single_table(int n, int t_tab[][19], int p_tab[n], int mask) { | ||
| 77 | int state[n]; | ||
| 78 | state[0] = 0; /* 0 should always be the solved state. */ | ||
| 79 | p_tab[0] = 0; | ||
| 80 | int state_count = 1; | ||
| 81 | for (int i = 0; i < state_count; i++) { | ||
| 82 | for (int m = 1; m < 19; m++) { | ||
| 83 | int next = t_tab[state[i]][m]; | ||
| 84 | if (mask & (1<<m) && !p_tab[next] && next) { | ||
| 85 | p_tab[next] = p_tab[state[i]] + 1; | ||
| 86 | state[state_count++] = next; | ||
| 87 | } | ||
| 88 | } | ||
| 89 | } | ||
| 90 | } | ||
| 91 | |||
| 92 | /* Similar to single table, but specific to "cp to htr". | ||
| 93 | * The idea is that we are considering the distance not necessarily to the | ||
| 94 | * solved state, but to any state that is either solved or reachable from | ||
| 95 | * cp_pruning_table. */ | ||
| 96 | void init_cptohtr_table(int n, int t_tab[][19], int p_tab[n], int mask) { | ||
| 97 | |||
| 98 | for (int i = 0; i < n; i++) | ||
| 99 | p_tab[i] = 21; | ||
| 100 | |||
| 101 | /* List of htr states */ | ||
| 102 | int good[n]; good[0] = 0; | ||
| 103 | int good_count = 1; | ||
| 104 | for (int i = 0; i < n; i++) | ||
| 105 | if (cp_htr_pruning_table[i]) | ||
| 106 | good[good_count++] = i; | ||
| 107 | |||
| 108 | /* Init pruning table starting from each possible state */ | ||
| 109 | int state[n]; | ||
| 110 | for (int j = 0; j < good_count; j++) { | ||
| 111 | state[0] = good[j]; | ||
| 112 | p_tab[state[0]] = 0; | ||
| 113 | int state_count = 1; | ||
| 114 | for (int i = 0; i < state_count; i++) { | ||
| 115 | for (int m = 1; m < 19; m++) { | ||
| 116 | int next = t_tab[state[i]][m]; | ||
| 117 | if (mask & (1<<m) && (p_tab[next] > p_tab[state[i]] + 1) && next) { | ||
| 118 | p_tab[next] = p_tab[state[i]] + 1; | ||
| 119 | state[state_count++] = next; | ||
| 120 | } | ||
| 121 | } | ||
| 122 | } | ||
| 123 | } | ||
| 124 | } | ||
| 125 | |||
| 126 | void init_double_table(int n1, int n2, | ||
| 127 | int t_table1[n1][19], int t_table2[n2][19], | ||
| 128 | int8_t p_table[n1][n2], int mask) { | ||
| 129 | static int state1[factorial8*pow3to7], state2[factorial8*pow3to7]; | ||
| 130 | state1[0] = 0; | ||
| 131 | state2[0] = 0; | ||
| 132 | p_table[0][0] = 0; | ||
| 133 | int state_count = 1; | ||
| 134 | for (int i = 0; i < state_count; i++) { | ||
| 135 | for (int m = 1; m < 19; m++) { | ||
| 136 | int next1 = t_table1[state1[i]][m]; | ||
| 137 | int next2 = t_table2[state2[i]][m]; | ||
| 138 | if (mask & (1<<m) && !p_table[next1][next2] && (next1 || next2)) { | ||
| 139 | p_table[next1][next2] = p_table[state1[i]][state2[i]] + 1; | ||
| 140 | state1[state_count] = next1; | ||
| 141 | state2[state_count] = next2; | ||
| 142 | state_count++; | ||
| 143 | } | ||
| 144 | } | ||
| 145 | } | ||
| 146 | } | ||
| 147 | |||
| 148 | void init_eofb_pruning_table() { | ||
| 149 | init_single_table(pow2to11, eofb_transition_table, eofb_pruning_table, | ||
| 150 | move_mask_all); | ||
| 151 | } | ||
| 152 | |||
| 153 | void init_eorl_pruning_table() { | ||
| 154 | init_single_table(pow2to11, eorl_transition_table, eorl_pruning_table, | ||
| 155 | move_mask_all); | ||
| 156 | } | ||
| 157 | |||
| 158 | void init_eoud_pruning_table() { | ||
| 159 | init_single_table(pow2to11, eoud_transition_table, eoud_pruning_table, | ||
| 160 | move_mask_all); | ||
| 161 | } | ||
| 162 | |||
| 163 | void init_coud_pruning_table() { | ||
| 164 | init_single_table(pow3to7, coud_transition_table, coud_pruning_table, | ||
| 165 | move_mask_all); | ||
| 166 | } | ||
| 167 | |||
| 168 | void init_cofb_pruning_table() { | ||
| 169 | init_single_table(pow3to7, cofb_transition_table, cofb_pruning_table, | ||
| 170 | move_mask_all); | ||
| 171 | } | ||
| 172 | |||
| 173 | void init_corl_pruning_table() { | ||
| 174 | init_single_table(pow3to7, corl_transition_table, corl_pruning_table, | ||
| 175 | move_mask_all); | ||
| 176 | } | ||
| 177 | |||
| 178 | void init_cp_pruning_table() { | ||
| 179 | init_single_table(factorial8, cp_transition_table, cp_pruning_table, | ||
| 180 | move_mask_all); | ||
| 181 | } | ||
| 182 | |||
| 183 | /* The following tables use the eo moveset */ | ||
| 184 | void init_eorl_from_eofb_pruning_table() { | ||
| 185 | init_single_table(pow2to11, eorl_transition_table, | ||
| 186 | eorl_from_eofb_pruning_table, move_mask_eofb); | ||
| 187 | } | ||
| 188 | |||
| 189 | void init_eoud_from_eofb_pruning_table() { | ||
| 190 | init_single_table(pow2to11, eoud_transition_table, | ||
| 191 | eoud_from_eofb_pruning_table, move_mask_eofb); | ||
| 192 | } | ||
| 193 | |||
| 194 | void init_eoud_from_eorl_pruning_table() { | ||
| 195 | init_single_table(pow2to11, eoud_transition_table, | ||
| 196 | eoud_from_eorl_pruning_table, move_mask_eorl); | ||
| 197 | } | ||
| 198 | |||
| 199 | void init_eofb_from_eorl_pruning_table() { | ||
| 200 | init_single_table(pow2to11, eofb_transition_table, | ||
| 201 | eofb_from_eorl_pruning_table, move_mask_eorl); | ||
| 202 | } | ||
| 203 | |||
| 204 | void init_eofb_from_eoud_pruning_table() { | ||
| 205 | init_single_table(pow2to11, eofb_transition_table, | ||
| 206 | eofb_from_eoud_pruning_table, move_mask_eoud); | ||
| 207 | } | ||
| 208 | |||
| 209 | void init_eorl_from_eoud_pruning_table() { | ||
| 210 | init_single_table(pow2to11, eorl_transition_table, | ||
| 211 | eorl_from_eoud_pruning_table, move_mask_eoud); | ||
| 212 | } | ||
| 213 | |||
| 214 | void init_coud_from_eofb_pruning_table() { | ||
| 215 | init_single_table(pow3to7, coud_transition_table, | ||
| 216 | coud_from_eofb_pruning_table, move_mask_eofb); | ||
| 217 | } | ||
| 218 | |||
| 219 | void init_corl_from_eofb_pruning_table() { | ||
| 220 | init_single_table(pow3to7, corl_transition_table, | ||
| 221 | corl_from_eofb_pruning_table, move_mask_eofb); | ||
| 222 | } | ||
| 223 | |||
| 224 | void init_coud_from_eorl_pruning_table() { | ||
| 225 | init_single_table(pow3to7, coud_transition_table, | ||
| 226 | coud_from_eorl_pruning_table, move_mask_eorl); | ||
| 227 | } | ||
| 228 | |||
| 229 | void init_cofb_from_eorl_pruning_table() { | ||
| 230 | init_single_table(pow3to7, cofb_transition_table, | ||
| 231 | cofb_from_eorl_pruning_table, move_mask_eorl); | ||
| 232 | } | ||
| 233 | |||
| 234 | void init_corl_from_eoud_pruning_table() { | ||
| 235 | init_single_table(pow3to7, corl_transition_table, | ||
| 236 | corl_from_eoud_pruning_table, move_mask_eoud); | ||
| 237 | } | ||
| 238 | |||
| 239 | void init_cofb_from_eoud_pruning_table() { | ||
| 240 | init_single_table(pow3to7, cofb_transition_table, | ||
| 241 | cofb_from_eoud_pruning_table, move_mask_eoud); | ||
| 242 | } | ||
| 243 | |||
| 244 | /* The following tables always use DR moveset */ | ||
| 245 | void init_epud_pruning_table() { | ||
| 246 | init_single_table(factorial8, epud_transition_table, epud_pruning_table, | ||
| 247 | move_mask_drud); | ||
| 248 | } | ||
| 249 | |||
| 250 | void init_epfb_pruning_table() { | ||
| 251 | init_single_table(factorial8, epfb_transition_table, epfb_pruning_table, | ||
| 252 | move_mask_drfb); | ||
| 253 | } | ||
| 254 | |||
| 255 | void init_eprl_pruning_table() { | ||
| 256 | init_single_table(factorial8, eprl_transition_table, eprl_pruning_table, | ||
| 257 | move_mask_drrl); | ||
| 258 | } | ||
| 259 | |||
| 260 | void init_cp_drud_pruning_table() { | ||
| 261 | init_single_table(factorial8, cp_transition_table, cp_drud_pruning_table, | ||
| 262 | move_mask_drud); | ||
| 263 | } | ||
| 264 | |||
| 265 | void init_cp_drfb_pruning_table() { | ||
| 266 | init_single_table(factorial8, cp_transition_table, cp_drfb_pruning_table, | ||
| 267 | move_mask_drfb); | ||
| 268 | } | ||
| 269 | |||
| 270 | void init_cp_drrl_pruning_table() { | ||
| 271 | init_single_table(factorial8, cp_transition_table, cp_drrl_pruning_table, | ||
| 272 | move_mask_drrl); | ||
| 273 | } | ||
| 274 | |||
| 275 | void init_cp_htr_table() { | ||
| 276 | init_single_table(factorial8, cp_transition_table, cp_htr_pruning_table, | ||
| 277 | move_mask_htr); | ||
| 278 | } | ||
| 279 | |||
| 280 | void init_cpud_to_htr_table() { | ||
| 281 | init_cptohtr_table(factorial8, cp_transition_table, | ||
| 282 | cpud_to_htr_pruning_table, move_mask_drud); | ||
| 283 | } | ||
| 284 | |||
| 285 | void init_cpfb_to_htr_table() { | ||
| 286 | init_cptohtr_table(factorial8, cp_transition_table, | ||
| 287 | cpfb_to_htr_pruning_table, move_mask_drfb); | ||
| 288 | } | ||
| 289 | |||
| 290 | void init_cprl_to_htr_table() { | ||
| 291 | init_cptohtr_table(factorial8, cp_transition_table, | ||
| 292 | cprl_to_htr_pruning_table, move_mask_drrl); | ||
| 293 | } | ||
| 294 | |||
| 295 | |||
| 296 | void init_eofb_epose_pruning_table() { | ||
| 297 | init_double_table(pow2to11, binom12on4, | ||
| 298 | eofb_transition_table, epose_transition_table, | ||
| 299 | eofb_epose_pruning_table, move_mask_all); | ||
| 300 | } | ||
| 301 | |||
| 302 | void init_eorl_eposs_pruning_table() { | ||
| 303 | init_double_table(pow2to11, binom12on4, | ||
| 304 | eorl_transition_table, eposs_transition_table, | ||
| 305 | eorl_eposs_pruning_table, move_mask_all); | ||
| 306 | } | ||
| 307 | |||
| 308 | void init_eoud_eposm_pruning_table() { | ||
| 309 | init_double_table(pow2to11, binom12on4, | ||
| 310 | eoud_transition_table, eposm_transition_table, | ||
| 311 | eoud_eposm_pruning_table, move_mask_all); | ||
| 312 | } | ||
| 313 | |||
| 314 | |||
| 315 | |||
| 316 | void init_eofb_coud_pruning_table() { | ||
| 317 | init_double_table(pow2to11, pow3to7, | ||
| 318 | eofb_transition_table, coud_transition_table, | ||
| 319 | eofb_coud_pruning_table, move_mask_all); | ||
| 320 | } | ||
| 321 | |||
| 322 | void init_eofb_corl_pruning_table() { | ||
| 323 | init_double_table(pow2to11, pow3to7, | ||
| 324 | eofb_transition_table, corl_transition_table, | ||
| 325 | eofb_corl_pruning_table, move_mask_all); | ||
| 326 | } | ||
| 327 | |||
| 328 | void init_eorl_coud_pruning_table() { | ||
| 329 | init_double_table(pow2to11, pow3to7, | ||
| 330 | eorl_transition_table, coud_transition_table, | ||
| 331 | eorl_coud_pruning_table, move_mask_all); | ||
| 332 | } | ||
| 333 | |||
| 334 | void init_eorl_cofb_pruning_table() { | ||
| 335 | init_double_table(pow2to11, pow3to7, | ||
| 336 | eorl_transition_table, cofb_transition_table, | ||
| 337 | eorl_cofb_pruning_table, move_mask_all); | ||
| 338 | } | ||
| 339 | |||
| 340 | void init_eoud_corl_pruning_table() { | ||
| 341 | init_double_table(pow2to11, pow3to7, | ||
| 342 | eoud_transition_table, corl_transition_table, | ||
| 343 | eoud_corl_pruning_table, move_mask_all); | ||
| 344 | } | ||
| 345 | |||
| 346 | void init_eoud_cofb_pruning_table() { | ||
| 347 | init_double_table(pow2to11, pow3to7, | ||
| 348 | eoud_transition_table, cofb_transition_table, | ||
| 349 | eoud_cofb_pruning_table, move_mask_all); | ||
| 350 | } | ||
| 351 | |||
| 352 | void init_coud_epose_from_eofb_pruning_table() { | ||
| 353 | init_double_table(pow3to7, binom12on4, | ||
| 354 | coud_transition_table, epose_transition_table, | ||
| 355 | coud_epose_from_eofb_pruning_table, move_mask_eofb); | ||
| 356 | } | ||
| 357 | |||
| 358 | void init_cofb_eposs_from_eorl_pruning_table() { | ||
| 359 | init_double_table(pow3to7, binom12on4, | ||
| 360 | cofb_transition_table, eposs_transition_table, | ||
| 361 | cofb_eposs_from_eorl_pruning_table, move_mask_eorl); | ||
| 362 | } | ||
| 363 | |||
| 364 | void init_corl_eposm_from_eoud_pruning_table() { | ||
| 365 | init_double_table(pow3to7, binom12on4, | ||
| 366 | corl_transition_table, eposm_transition_table, | ||
| 367 | corl_eposm_from_eoud_pruning_table, move_mask_eoud); | ||
| 368 | } | ||
| 369 | |||
| 370 | void init_coud_epose_from_eorl_pruning_table() { | ||
| 371 | init_double_table(pow3to7, binom12on4, | ||
| 372 | coud_transition_table, epose_transition_table, | ||
| 373 | coud_epose_from_eorl_pruning_table, move_mask_eorl); | ||
| 374 | } | ||
| 375 | |||
| 376 | void init_cofb_eposs_from_eoud_pruning_table() { | ||
| 377 | init_double_table(pow3to7, binom12on4, | ||
| 378 | cofb_transition_table, eposs_transition_table, | ||
| 379 | cofb_eposs_from_eoud_pruning_table, move_mask_eoud); | ||
| 380 | } | ||
| 381 | |||
| 382 | void init_corl_eposm_from_eofb_pruning_table() { | ||
| 383 | init_double_table(pow3to7, binom12on4, | ||
| 384 | corl_transition_table, eposm_transition_table, | ||
| 385 | corl_eposm_from_eofb_pruning_table, move_mask_eofb); | ||
| 386 | } | ||
| 387 | |||
| 388 | void init_cp_co_pruning_table() { | ||
| 389 | init_double_table(factorial8, pow3to7, | ||
| 390 | cp_transition_table, coud_transition_table, | ||
| 391 | cp_co_pruning_table, move_mask_all); | ||
| 392 | } | ||
| 393 | |||
| 394 | void init_triple_eo_pruning_table() { | ||
| 395 | init_double_table(pow2to11, binom12on4*binom8on4, | ||
| 396 | eofb_transition_table, emslices_transition_table, | ||
| 397 | triple_eo_pruning_table, move_mask_all); | ||
| 398 | } | ||
| 399 | |||
| 400 | |||
| 401 | void init_small_pruning_tables() { | ||
| 402 | if (initialized_small) | ||
| 403 | return; | ||
| 404 | |||
| 405 | init_eofb_pruning_table(); | ||
| 406 | init_eorl_pruning_table(); | ||
| 407 | init_eoud_pruning_table(); | ||
| 408 | init_coud_pruning_table(); | ||
| 409 | init_cofb_pruning_table(); | ||
| 410 | init_corl_pruning_table(); | ||
| 411 | init_cp_pruning_table(); | ||
| 412 | |||
| 413 | init_eorl_from_eofb_pruning_table(); | ||
| 414 | init_eoud_from_eofb_pruning_table(); | ||
| 415 | init_eoud_from_eorl_pruning_table(); | ||
| 416 | init_eofb_from_eorl_pruning_table(); | ||
| 417 | init_eofb_from_eoud_pruning_table(); | ||
| 418 | init_eorl_from_eoud_pruning_table(); | ||
| 419 | |||
| 420 | init_coud_from_eofb_pruning_table(); | ||
| 421 | init_corl_from_eofb_pruning_table(); | ||
| 422 | init_coud_from_eorl_pruning_table(); | ||
| 423 | init_cofb_from_eorl_pruning_table(); | ||
| 424 | init_cofb_from_eoud_pruning_table(); | ||
| 425 | init_corl_from_eoud_pruning_table(); | ||
| 426 | |||
| 427 | init_epud_pruning_table(); | ||
| 428 | init_epfb_pruning_table(); | ||
| 429 | init_eprl_pruning_table(); | ||
| 430 | init_cp_drud_pruning_table(); | ||
| 431 | init_cp_drfb_pruning_table(); | ||
| 432 | init_cp_drrl_pruning_table(); | ||
| 433 | |||
| 434 | init_cp_htr_table(); | ||
| 435 | init_cpud_to_htr_table(); | ||
| 436 | init_cpfb_to_htr_table(); | ||
| 437 | init_cprl_to_htr_table(); | ||
| 438 | |||
| 439 | initialized_small = 1; | ||
| 440 | } | ||
| 441 | |||
| 442 | void init_directdr_pruning_tables() { | ||
| 443 | if (initialized_directdr) | ||
| 444 | return; | ||
| 445 | |||
| 446 | init_eofb_epose_pruning_table(); | ||
| 447 | init_eorl_eposs_pruning_table(); | ||
| 448 | init_eoud_eposm_pruning_table(); | ||
| 449 | |||
| 450 | init_eofb_coud_pruning_table(); | ||
| 451 | init_eofb_corl_pruning_table(); | ||
| 452 | init_eorl_coud_pruning_table(); | ||
| 453 | init_eorl_cofb_pruning_table(); | ||
| 454 | init_eoud_cofb_pruning_table(); | ||
| 455 | init_eoud_corl_pruning_table(); | ||
| 456 | |||
| 457 | initialized_directdr = 1; | ||
| 458 | } | ||
| 459 | |||
| 460 | void init_drfromeo_pruning_tables() { | ||
| 461 | if (initialized_drfromeo) | ||
| 462 | return; | ||
| 463 | |||
| 464 | init_coud_epose_from_eofb_pruning_table(); | ||
| 465 | init_cofb_eposs_from_eorl_pruning_table(); | ||
| 466 | init_corl_eposm_from_eoud_pruning_table(); | ||
| 467 | init_coud_epose_from_eorl_pruning_table(); | ||
| 468 | init_cofb_eposs_from_eoud_pruning_table(); | ||
| 469 | init_corl_eposm_from_eofb_pruning_table(); | ||
| 470 | |||
| 471 | initialized_drfromeo = 1; | ||
| 472 | } | ||
| 473 | |||
| 474 | void init_huge_pruning_tables() { | ||
| 475 | if (initialized_huge) | ||
| 476 | return; | ||
| 477 | |||
| 478 | init_cp_co_pruning_table(); | ||
| 479 | init_triple_eo_pruning_table(); | ||
| 480 | |||
| 481 | initialized_huge = 1; | ||
| 482 | } | ||
| 483 | |||
