mirror of
https://github.com/VectorCamp/vectorscan.git
synced 2025-11-18 10:10:35 +03:00
Rose: pack global state bits into one u8
Eliminate the RoseRuntimeState structure in favour of a single status byte that is stored in scratch and copied to/from stream state.
This commit is contained in:
committed by
Matthew Barr
parent
28f379d738
commit
9e9bb6a960
@@ -55,14 +55,6 @@
|
||||
|
||||
#define rose_inline really_inline
|
||||
|
||||
/** \brief Fetch runtime state ptr. */
|
||||
static really_inline
|
||||
struct RoseRuntimeState *getRuntimeState(char *state) {
|
||||
struct RoseRuntimeState *rs = (struct RoseRuntimeState *)(state);
|
||||
assert(ISALIGNED_N(rs, 8));
|
||||
return rs;
|
||||
}
|
||||
|
||||
static really_inline
|
||||
const void *getByOffset(const struct RoseEngine *t, u32 offset) {
|
||||
assert(offset < t->size);
|
||||
@@ -71,7 +63,7 @@ const void *getByOffset(const struct RoseEngine *t, u32 offset) {
|
||||
|
||||
static really_inline
|
||||
void *getRoleState(char *state) {
|
||||
return state + sizeof(struct RoseRuntimeState);
|
||||
return state + sizeof(u8); // status flags
|
||||
}
|
||||
|
||||
/** \brief Fetch the active array for suffix nfas. */
|
||||
|
||||
Reference in New Issue
Block a user