mirror of
https://github.com/VectorCamp/vectorscan.git
synced 2025-09-30 11:44:28 +03:00
allow streams to marked as exhausted in more cases
At stream boundaries, we can mark streams as exhausted if there are no groups active and there are no other ways to report matches. This allows us to stop maintaining the history buffer on subsequent stream writes. Previously, streams were only marked as exhausted if a pure highlander case reported all patterns or the outfix in a sole outfix case died.
This commit is contained in:
@@ -202,6 +202,17 @@ void erase_all(C *container, const D &donor) {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
template<typename C, typename Pred>
|
||||
bool any_of_in(const C &c, Pred p) {
|
||||
return std::any_of(c.begin(), c.end(), std::move(p));
|
||||
}
|
||||
|
||||
template<typename C, typename Pred>
|
||||
bool all_of_in(const C &c, Pred p) {
|
||||
return std::all_of(c.begin(), c.end(), std::move(p));
|
||||
}
|
||||
|
||||
} // namespace ue2
|
||||
|
||||
#ifdef DUMP_SUPPORT
|
||||
|
Reference in New Issue
Block a user