aboutsummaryrefslogtreecommitdiff
path: root/src/solvers/h48/solve.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/solvers/h48/solve.h')
-rw-r--r--src/solvers/h48/solve.h30
1 files changed, 27 insertions, 3 deletions
diff --git a/src/solvers/h48/solve.h b/src/solvers/h48/solve.h
index ad66fd4..6fb359d 100644
--- a/src/solvers/h48/solve.h
+++ b/src/solvers/h48/solve.h
@@ -110,7 +110,7 @@ STATIC_INLINE bool
110solve_h48_stop(dfsarg_solve_h48_t arg[static 1]) 110solve_h48_stop(dfsarg_solve_h48_t arg[static 1])
111{ 111{
112 uint32_t data, data_inv; 112 uint32_t data, data_inv;
113 int64_t coord; 113 int64_t coord, coordext, coordmin;
114 int8_t target, nh, n; 114 int8_t target, nh, n;
115 uint8_t pval_cocsep, pval_eoesep; 115 uint8_t pval_cocsep, pval_eoesep;
116 116
@@ -142,17 +142,29 @@ solve_h48_stop(dfsarg_solve_h48_t arg[static 1])
142 if (!arg->use_lb_inverse) { 142 if (!arg->use_lb_inverse) {
143 coord = coord_h48_edges( 143 coord = coord_h48_edges(
144 arg->inverse, COCLASS(data_inv), TTREP(data_inv), arg->h); 144 arg->inverse, COCLASS(data_inv), TTREP(data_inv), arg->h);
145 arg->lb_inverse = get_h48_pval(arg->h48data, coord, arg->k); 145 coordext = H48_LINE_EXT(coord);
146 arg->lb_inverse = get_h48_pval(arg->h48data, coordext, arg->k);
146 arg->table_lookups++; 147 arg->table_lookups++;
147 148
148 if (arg->k == 2 && arg->lb_inverse == 0) { 149 if (arg->k == 2 && arg->lb_inverse == 0) {
149 arg->table_fallbacks++; 150 arg->table_fallbacks++;
150 151
152 /*
151 pval_cocsep = get_h48_pval( 153 pval_cocsep = get_h48_pval(
152 arg->h48data_fallback_h0k4, coord >> arg->h, 4); 154 arg->h48data_fallback_h0k4, coord >> arg->h, 4);
155 */
156#if 1
157 coordmin = H48_LINE_MIN(coord);
158 pval_cocsep = get_h48_pvalmin(
159 arg->h48data, coordmin, arg->k);
153 pval_eoesep = get_eoesep_pval_cube( 160 pval_eoesep = get_eoesep_pval_cube(
154 arg->h48data_fallback_eoesep, arg->inverse); 161 arg->h48data_fallback_eoesep, arg->inverse);
155 arg->lb_inverse = MAX(pval_cocsep, pval_eoesep); 162 arg->lb_inverse = MAX(pval_cocsep, pval_eoesep);
163#else
164 coordmin = H48_LINE_MIN(coord);
165 arg->lb_inverse = get_h48_pvalmin(
166 arg->h48data, coordmin, arg->k);
167#endif
156 } else { 168 } else {
157 arg->lb_inverse += arg->base; 169 arg->lb_inverse += arg->base;
158 } 170 }
@@ -170,17 +182,29 @@ solve_h48_stop(dfsarg_solve_h48_t arg[static 1])
170 if (!arg->use_lb_normal) { 182 if (!arg->use_lb_normal) {
171 coord = coord_h48_edges( 183 coord = coord_h48_edges(
172 arg->cube, COCLASS(data), TTREP(data), arg->h); 184 arg->cube, COCLASS(data), TTREP(data), arg->h);
173 arg->lb_normal = get_h48_pval(arg->h48data, coord, arg->k); 185 coordext = H48_LINE_EXT(coord);
186 arg->lb_normal = get_h48_pval(arg->h48data, coordext, arg->k);
174 arg->table_lookups++; 187 arg->table_lookups++;
175 188
176 if (arg->k == 2 && arg->lb_normal == 0) { 189 if (arg->k == 2 && arg->lb_normal == 0) {
177 arg->table_fallbacks++; 190 arg->table_fallbacks++;
178 191
192 /*
179 pval_cocsep = get_h48_pval( 193 pval_cocsep = get_h48_pval(
180 arg->h48data_fallback_h0k4, coord >> arg->h, 4); 194 arg->h48data_fallback_h0k4, coord >> arg->h, 4);
195 */
196#if 1
197 coordmin = H48_LINE_MIN(coord);
198 pval_cocsep = get_h48_pval(
199 arg->h48data, coordmin, arg->k);
181 pval_eoesep = get_eoesep_pval_cube( 200 pval_eoesep = get_eoesep_pval_cube(
182 arg->h48data_fallback_eoesep, arg->cube); 201 arg->h48data_fallback_eoesep, arg->cube);
183 arg->lb_normal = MAX(pval_cocsep, pval_eoesep); 202 arg->lb_normal = MAX(pval_cocsep, pval_eoesep);
203#else
204 coordmin = H48_LINE_MIN(coord);
205 arg->lb_normal = get_h48_pval(
206 arg->h48data, coordmin, arg->k);
207#endif
184 } else { 208 } else {
185 arg->lb_normal += arg->base; 209 arg->lb_normal += arg->base;
186 } 210 }

Generated with cgit - Back to sebastiano.tronto.net