mirror of
https://github.com/VectorCamp/vectorscan.git
synced 2025-11-17 01:41:51 +03:00
SHENG32: 32-state 1-byte shuffle based DFA.
This commit is contained in:
committed by
Konstantinos Margaritis
parent
6f8bfa1854
commit
2cde84c96d
@@ -72,6 +72,7 @@ enum NFAEngineType {
|
||||
TAMARAMA_NFA, /**< magic nfa container */
|
||||
MCSHENG_NFA_8, /**< magic pseudo nfa */
|
||||
MCSHENG_NFA_16, /**< magic pseudo nfa */
|
||||
SHENG_NFA_32, /**< magic pseudo nfa */
|
||||
/** \brief bogus NFA - not used */
|
||||
INVALID_NFA
|
||||
};
|
||||
@@ -157,10 +158,26 @@ static really_inline int isGoughType(u8 t) {
|
||||
}
|
||||
|
||||
/** \brief True if the given type (from NFA::type) is a Sheng DFA. */
|
||||
static really_inline int isShengType(u8 t) {
|
||||
static really_inline int isSheng16Type(u8 t) {
|
||||
return t == SHENG_NFA;
|
||||
}
|
||||
|
||||
#if defined(HAVE_AVX512VBMI)
|
||||
/** \brief True if the given type (from NFA::type) is a Sheng32 DFA. */
|
||||
static really_inline int isSheng32Type(u8 t) {
|
||||
return t == SHENG_NFA_32;
|
||||
}
|
||||
#endif
|
||||
|
||||
/** \brief True if the given type (from NFA::type) is a Sheng/Sheng32 DFA. */
|
||||
static really_inline int isShengType(u8 t) {
|
||||
#if defined(HAVE_AVX512VBMI)
|
||||
return t == SHENG_NFA || t == SHENG_NFA_32;
|
||||
#else
|
||||
return t == SHENG_NFA;
|
||||
#endif
|
||||
}
|
||||
|
||||
/**
|
||||
* \brief True if the given type (from NFA::type) is a McClellan, Gough or
|
||||
* Sheng DFA.
|
||||
|
||||
Reference in New Issue
Block a user