diff options
author | Ivan Blinkov <ivan@blinkov.ru> | 2022-02-10 16:47:10 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:47:10 +0300 |
commit | 1aeb9a455974457866f78722ad98114bafc84e8a (patch) | |
tree | e4340eaf1668684d83a0a58c36947c5def5350ad /contrib/libs/hyperscan/src/hwlm/hwlm_build.h | |
parent | bd5ef432f5cfb1e18851381329d94665a4c22470 (diff) | |
download | ydb-1aeb9a455974457866f78722ad98114bafc84e8a.tar.gz |
Restoring authorship annotation for Ivan Blinkov <ivan@blinkov.ru>. Commit 1 of 2.
Diffstat (limited to 'contrib/libs/hyperscan/src/hwlm/hwlm_build.h')
-rw-r--r-- | contrib/libs/hyperscan/src/hwlm/hwlm_build.h | 114 |
1 files changed, 57 insertions, 57 deletions
diff --git a/contrib/libs/hyperscan/src/hwlm/hwlm_build.h b/contrib/libs/hyperscan/src/hwlm/hwlm_build.h index 91f227dce4..6b61cc1f0d 100644 --- a/contrib/libs/hyperscan/src/hwlm/hwlm_build.h +++ b/contrib/libs/hyperscan/src/hwlm/hwlm_build.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2017, Intel Corporation + * Copyright (c) 2015-2017, Intel Corporation * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: @@ -36,9 +36,9 @@ #include "hwlm.h" #include "hwlm_literal.h" #include "ue2common.h" -#include "util/bytecode_ptr.h" +#include "util/bytecode_ptr.h" -#include <map> +#include <map> #include <memory> #include <vector> @@ -46,62 +46,62 @@ struct HWLM; namespace ue2 { -class FDREngineDescription; -class TeddyEngineDescription; +class FDREngineDescription; +class TeddyEngineDescription; struct CompileContext; struct Grey; -/** \brief Class representing a literal matcher prototype. */ -struct HWLMProto { - /** - * \brief Engine type to distinguish noodle from FDR and Teddy. - */ - u8 engType; - - /** - * \brief FDR engine description. - */ - std::unique_ptr<FDREngineDescription> fdrEng; - - /** - * \brief Teddy engine description. - */ - std::unique_ptr<TeddyEngineDescription> teddyEng; - - /** - * \brief HWLM literals passed from Rose. - */ - std::vector<hwlmLiteral> lits; - - /** - * \brief Bucket assignment info in FDR and Teddy - */ - std::map<u32, std::vector<u32>> bucketToLits; - - /** - * \brief Flag to optimise matcher for small size from Rose. - */ - bool make_small = false; - - HWLMProto(u8 engType_in, std::vector<hwlmLiteral> lits_in); - - HWLMProto(u8 engType_in, std::unique_ptr<FDREngineDescription> eng_in, - std::vector<hwlmLiteral> lits_in, - std::map<u32, std::vector<u32>> bucketToLits_in, - bool make_small_in); - - HWLMProto(u8 engType_in, std::unique_ptr<TeddyEngineDescription> eng_in, - std::vector<hwlmLiteral> lits_in, - std::map<u32, std::vector<u32>> bucketToLits_in, - bool make_small_in); - - ~HWLMProto(); +/** \brief Class representing a literal matcher prototype. */ +struct HWLMProto { + /** + * \brief Engine type to distinguish noodle from FDR and Teddy. + */ + u8 engType; + + /** + * \brief FDR engine description. + */ + std::unique_ptr<FDREngineDescription> fdrEng; + + /** + * \brief Teddy engine description. + */ + std::unique_ptr<TeddyEngineDescription> teddyEng; + + /** + * \brief HWLM literals passed from Rose. + */ + std::vector<hwlmLiteral> lits; + + /** + * \brief Bucket assignment info in FDR and Teddy + */ + std::map<u32, std::vector<u32>> bucketToLits; + + /** + * \brief Flag to optimise matcher for small size from Rose. + */ + bool make_small = false; + + HWLMProto(u8 engType_in, std::vector<hwlmLiteral> lits_in); + + HWLMProto(u8 engType_in, std::unique_ptr<FDREngineDescription> eng_in, + std::vector<hwlmLiteral> lits_in, + std::map<u32, std::vector<u32>> bucketToLits_in, + bool make_small_in); + + HWLMProto(u8 engType_in, std::unique_ptr<TeddyEngineDescription> eng_in, + std::vector<hwlmLiteral> lits_in, + std::map<u32, std::vector<u32>> bucketToLits_in, + bool make_small_in); + + ~HWLMProto(); }; /** \brief Build an \ref HWLM literal matcher runtime structure for a group of * literals. * - * \param proto Literal matcher prototype. + * \param proto Literal matcher prototype. * \param cc Compile context. * \param expected_groups FIXME: document me! * @@ -109,13 +109,13 @@ struct HWLMProto { * may result in a nullptr return value, or a std::bad_alloc exception being * thrown. */ -bytecode_ptr<HWLM> hwlmBuild(const HWLMProto &proto, const CompileContext &cc, - hwlm_group_t expected_groups = HWLM_ALL_GROUPS); - -std::unique_ptr<HWLMProto> -hwlmBuildProto(std::vector<hwlmLiteral> &lits, bool make_small, - const CompileContext &cc); +bytecode_ptr<HWLM> hwlmBuild(const HWLMProto &proto, const CompileContext &cc, + hwlm_group_t expected_groups = HWLM_ALL_GROUPS); +std::unique_ptr<HWLMProto> +hwlmBuildProto(std::vector<hwlmLiteral> &lits, bool make_small, + const CompileContext &cc); + /** * Returns an estimate of the number of repeated characters on the end of a * literal that will make a literal set of size \a numLiterals suffer |