take mask overhang into account for hwlm accel, float min dist

This commit is contained in:
Alex Coyte
2016-07-18 11:33:13 +10:00
committed by Matthew Barr
parent 34289eb3b4
commit d574557200
3 changed files with 57 additions and 8 deletions

View File

@@ -277,6 +277,17 @@ struct rose_literal_id {
u32 distinctiveness;
size_t elength(void) const { return s.length() + delay; }
size_t elength_including_mask(void) const {
size_t mask_len = msk.size();
for (u8 c : msk) {
if (!c) {
mask_len--;
} else {
break;
}
}
return MAX(mask_len, s.length()) + delay;
}
};
static inline