aboutsummaryrefslogtreecommitdiffstats
path: root/contrib/libs/hyperscan/src/fdr/fdr_confirm_runtime.h
diff options
context:
space:
mode:
authorIvan Blinkov <ivan@blinkov.ru>2022-02-10 16:47:10 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:47:10 +0300
commit1aeb9a455974457866f78722ad98114bafc84e8a (patch)
treee4340eaf1668684d83a0a58c36947c5def5350ad /contrib/libs/hyperscan/src/fdr/fdr_confirm_runtime.h
parentbd5ef432f5cfb1e18851381329d94665a4c22470 (diff)
downloadydb-1aeb9a455974457866f78722ad98114bafc84e8a.tar.gz
Restoring authorship annotation for Ivan Blinkov <ivan@blinkov.ru>. Commit 1 of 2.
Diffstat (limited to 'contrib/libs/hyperscan/src/fdr/fdr_confirm_runtime.h')
-rw-r--r--contrib/libs/hyperscan/src/fdr/fdr_confirm_runtime.h84
1 files changed, 42 insertions, 42 deletions
diff --git a/contrib/libs/hyperscan/src/fdr/fdr_confirm_runtime.h b/contrib/libs/hyperscan/src/fdr/fdr_confirm_runtime.h
index 5a2164952c..79b8a1bf56 100644
--- a/contrib/libs/hyperscan/src/fdr/fdr_confirm_runtime.h
+++ b/contrib/libs/hyperscan/src/fdr/fdr_confirm_runtime.h
@@ -29,7 +29,7 @@
#ifndef FDR_CONFIRM_RUNTIME_H
#define FDR_CONFIRM_RUNTIME_H
-#include "scratch.h"
+#include "scratch.h"
#include "fdr_internal.h"
#include "fdr_loadval.h"
#include "hwlm/hwlm.h"
@@ -40,65 +40,65 @@
// this is ordinary confirmation function which runs through
// the whole confirmation procedure
static really_inline
-void confWithBit(const struct FDRConfirm *fdrc, const struct FDR_Runtime_Args *a,
- size_t i, hwlmcb_rv_t *control, u32 *last_match,
- u64a conf_key, u64a *conf, u8 bit) {
+void confWithBit(const struct FDRConfirm *fdrc, const struct FDR_Runtime_Args *a,
+ size_t i, hwlmcb_rv_t *control, u32 *last_match,
+ u64a conf_key, u64a *conf, u8 bit) {
assert(i < a->len);
- assert(i >= a->start_offset);
+ assert(i >= a->start_offset);
assert(ISALIGNED(fdrc));
const u8 * buf = a->buf;
- u32 c = CONF_HASH_CALL(conf_key, fdrc->andmsk, fdrc->mult,
- fdrc->nBits);
- u32 start = getConfirmLitIndex(fdrc)[c];
- if (likely(!start)) {
- return;
+ u32 c = CONF_HASH_CALL(conf_key, fdrc->andmsk, fdrc->mult,
+ fdrc->nBits);
+ u32 start = getConfirmLitIndex(fdrc)[c];
+ if (likely(!start)) {
+ return;
}
- const struct LitInfo *li
- = (const struct LitInfo *)((const u8 *)fdrc + start);
+ const struct LitInfo *li
+ = (const struct LitInfo *)((const u8 *)fdrc + start);
- struct hs_scratch *scratch = a->scratch;
- assert(!scratch->fdr_conf);
- scratch->fdr_conf = conf;
- scratch->fdr_conf_offset = bit;
- u8 oldNext; // initialized in loop
- do {
- assert(ISALIGNED(li));
+ struct hs_scratch *scratch = a->scratch;
+ assert(!scratch->fdr_conf);
+ scratch->fdr_conf = conf;
+ scratch->fdr_conf_offset = bit;
+ u8 oldNext; // initialized in loop
+ do {
+ assert(ISALIGNED(li));
- if (unlikely((conf_key & li->msk) != li->v)) {
- goto out;
- }
+ if (unlikely((conf_key & li->msk) != li->v)) {
+ goto out;
+ }
- if ((*last_match == li->id) && (li->flags & FDR_LIT_FLAG_NOREPEAT)) {
- goto out;
- }
+ if ((*last_match == li->id) && (li->flags & FDR_LIT_FLAG_NOREPEAT)) {
+ goto out;
+ }
- const u8 *loc = buf + i - li->size + 1;
+ const u8 *loc = buf + i - li->size + 1;
- if (loc < buf) {
- u32 full_overhang = buf - loc;
- size_t len_history = a->len_history;
+ if (loc < buf) {
+ u32 full_overhang = buf - loc;
+ size_t len_history = a->len_history;
- // can't do a vectored confirm either if we don't have
- // the bytes
- if (full_overhang > len_history) {
+ // can't do a vectored confirm either if we don't have
+ // the bytes
+ if (full_overhang > len_history) {
goto out;
}
}
- assert(li->size <= sizeof(CONF_TYPE));
+ assert(li->size <= sizeof(CONF_TYPE));
- if (unlikely(!(li->groups & *control))) {
- goto out;
+ if (unlikely(!(li->groups & *control))) {
+ goto out;
}
- *last_match = li->id;
- *control = a->cb(i, li->id, scratch);
- out:
- oldNext = li->next; // oldNext is either 0 or an 'adjust' value
- li++;
- } while (oldNext);
- scratch->fdr_conf = NULL;
+ *last_match = li->id;
+ *control = a->cb(i, li->id, scratch);
+ out:
+ oldNext = li->next; // oldNext is either 0 or an 'adjust' value
+ li++;
+ } while (oldNext);
+ scratch->fdr_conf = NULL;
}
#endif