diff options
author | Ivan Blinkov <ivan@blinkov.ru> | 2022-02-10 16:47:11 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:47:11 +0300 |
commit | 5b283123c882433dafbaf6b338adeea16c1a0ea0 (patch) | |
tree | 339adc63bce23800021202ae4a8328a843dc447a /contrib/libs/hyperscan/src/nfa/mcclellan_common_impl.h | |
parent | 1aeb9a455974457866f78722ad98114bafc84e8a (diff) | |
download | ydb-5b283123c882433dafbaf6b338adeea16c1a0ea0.tar.gz |
Restoring authorship annotation for Ivan Blinkov <ivan@blinkov.ru>. Commit 2 of 2.
Diffstat (limited to 'contrib/libs/hyperscan/src/nfa/mcclellan_common_impl.h')
-rw-r--r-- | contrib/libs/hyperscan/src/nfa/mcclellan_common_impl.h | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/contrib/libs/hyperscan/src/nfa/mcclellan_common_impl.h b/contrib/libs/hyperscan/src/nfa/mcclellan_common_impl.h index ad55579627..7b0e7f48cd 100644 --- a/contrib/libs/hyperscan/src/nfa/mcclellan_common_impl.h +++ b/contrib/libs/hyperscan/src/nfa/mcclellan_common_impl.h @@ -33,7 +33,7 @@ enum MatchMode { }; static really_inline -const struct mstate_aux *get_aux(const struct mcclellan *m, u32 s) { +const struct mstate_aux *get_aux(const struct mcclellan *m, u32 s) { const char *nfa = (const char *)m - sizeof(struct NFA); const struct mstate_aux *aux = s + (const struct mstate_aux *)(nfa + m->aux_offset); @@ -43,15 +43,15 @@ const struct mstate_aux *get_aux(const struct mcclellan *m, u32 s) { } static really_inline -u32 mcclellanEnableStarts(const struct mcclellan *m, u32 s) { +u32 mcclellanEnableStarts(const struct mcclellan *m, u32 s) { const struct mstate_aux *aux = get_aux(m, s); - DEBUG_PRINTF("enabling starts %u->%hu\n", s, aux->top); + DEBUG_PRINTF("enabling starts %u->%hu\n", s, aux->top); return aux->top; } static really_inline -u32 doSherman16(const char *sherman_state, u8 cprime, const u16 *succ_table, +u32 doSherman16(const char *sherman_state, u8 cprime, const u16 *succ_table, u32 as) { assert(ISALIGNED_N(sherman_state, 16)); @@ -70,17 +70,17 @@ u32 doSherman16(const char *sherman_state, u8 cprime, const u16 *succ_table, if (z) { u32 i = ctz32(z & ~0xf) - 4; - u32 s_out = unaligned_load_u16((const u8 *)sherman_state + u32 s_out = unaligned_load_u16((const u8 *)sherman_state + SHERMAN_STATES_OFFSET(len) + sizeof(u16) * i); - DEBUG_PRINTF("found sherman match at %u/%u for c'=%hhu s=%u\n", i, - len, cprime, s_out); + DEBUG_PRINTF("found sherman match at %u/%u for c'=%hhu s=%u\n", i, + len, cprime, s_out); return s_out; } } - u32 daddy = *(const u16 *)(sherman_state + SHERMAN_DADDY_OFFSET); - return succ_table[(daddy << as) + cprime]; + u32 daddy = *(const u16 *)(sherman_state + SHERMAN_DADDY_OFFSET); + return succ_table[(daddy << as) + cprime]; } static really_inline |