mirror of
https://github.com/VectorCamp/vectorscan.git
synced 2025-11-16 17:31:51 +03:00
tamarama: add container engine for exclusive nfas
Add the new Tamarama engine that acts as a container for infix/suffix engines that can be proven to run exclusively of one another. This reduces stream state for pattern sets with many exclusive engines.
This commit is contained in:
@@ -67,6 +67,7 @@ enum NFAEngineType {
|
||||
LBR_NFA_Shuf, /**< magic pseudo nfa */
|
||||
LBR_NFA_Truf, /**< magic pseudo nfa */
|
||||
CASTLE_NFA_0, /**< magic pseudo nfa */
|
||||
TAMARAMA_NFA_0, /**< magic nfa container */
|
||||
/** \brief bogus NFA - not used */
|
||||
INVALID_NFA
|
||||
};
|
||||
@@ -173,6 +174,12 @@ int isLbrType(u8 t) {
|
||||
t == LBR_NFA_Shuf || t == LBR_NFA_Truf;
|
||||
}
|
||||
|
||||
/** \brief True if the given type (from NFA::type) is a container engine. */
|
||||
static really_inline
|
||||
int isContainerType(u8 t) {
|
||||
return t == TAMARAMA_NFA_0;
|
||||
}
|
||||
|
||||
static really_inline
|
||||
int isMultiTopType(u8 t) {
|
||||
return !isDfaType(t) && !isLbrType(t);
|
||||
|
||||
Reference in New Issue
Block a user