mirror of
https://github.com/VectorCamp/vectorscan.git
synced 2025-11-17 17:55:28 +03:00
Check if any tugs are alive when compressing/expanding repeats
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2015-2016, Intel Corporation
|
||||
* Copyright (c) 2015-2017, Intel Corporation
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
@@ -177,6 +177,10 @@ u64a repeatLastTopRange(const union RepeatControl *ctrl, const void *state) {
|
||||
|
||||
u64a repeatLastTopBitmap(const union RepeatControl *ctrl) {
|
||||
const struct RepeatBitmapControl *xs = &ctrl->bitmap;
|
||||
if (!xs->bitmap) {
|
||||
/* last top was too long ago */
|
||||
return 0;
|
||||
}
|
||||
return xs->offset + 63 - clz64(xs->bitmap);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user