We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent e3a299b commit 0aecbffCopy full SHA for 0aecbff
heuristics.hpp
@@ -381,6 +381,7 @@ class coarsen_heuristics {
381
if(is_uniform || g.values(j) == max_ewt){
382
uint32_t v = g.graph.entries(j);
383
uint32_t tiebreaker = xorshiftHash<uint32_t>(v + r);
384
+ // >= since 0 must be a valid max val
385
if(tiebreaker >= local.val){
386
local.val = tiebreaker;
387
local.loc = j;
@@ -417,7 +418,8 @@ class coarsen_heuristics {
417
418
tiebreaker = xorshiftHash<uint32_t>(v + r);
419
} else if(is_uniform || max_ewt == g.values(j)){
420
uint32_t sim_wgt = xorshiftHash<uint32_t>(v + r);
- if(tiebreaker < sim_wgt){
421
+ // >= since 0 must be a valid max tiebreaker
422
+ if(sim_wgt >= tiebreaker){
423
h = v;
424
tiebreaker = sim_wgt;
425
}
0 commit comments