A tiny open-chaining hash set of interned PC-set state ids, keyed by their pc-set. Replaces a std::unordered_map so the DFAs stay literal types (a constexpr real::regex embeds one in its scratch state); all-std::vector storage is constexpr-constructible in C++20. Maps a candidate pc-set to its existing state id, or not_found, comparing against the owner's pcs.
More...
#include <lazy_dfa.hpp>
|
| constexpr | pc_set_cache () |
| |
| constexpr std::uint32_t | find (const std::vector< std::int32_t > &pcs, const std::vector< std::vector< std::int32_t > > &state_pcs) const |
| |
| constexpr void | insert (const std::vector< std::int32_t > &pcs, std::uint32_t id) |
| |
| constexpr void | clear () |
| |
|
| static constexpr std::size_t | hash (const std::vector< std::int32_t > &v) |
| |
|
| std::vector< std::vector< std::uint32_t > > | buckets |
| |
A tiny open-chaining hash set of interned PC-set state ids, keyed by their pc-set. Replaces a std::unordered_map so the DFAs stay literal types (a constexpr real::regex embeds one in its scratch state); all-std::vector storage is constexpr-constructible in C++20. Maps a candidate pc-set to its existing state id, or not_found, comparing against the owner's pcs.
Definition at line 425 of file lazy_dfa.hpp.
◆ pc_set_cache()
| constexpr real::detail::pc_set_cache::pc_set_cache |
( |
| ) |
|
|
inlineconstexpr |
◆ clear()
| constexpr void real::detail::pc_set_cache::clear |
( |
| ) |
|
|
inlineconstexpr |
◆ find()
| constexpr std::uint32_t real::detail::pc_set_cache::find |
( |
const std::vector< std::int32_t > & |
pcs, |
|
|
const std::vector< std::vector< std::int32_t > > & |
state_pcs |
|
) |
| const |
|
inlineconstexpr |
◆ hash()
| static constexpr std::size_t real::detail::pc_set_cache::hash |
( |
const std::vector< std::int32_t > & |
v | ) |
|
|
inlinestaticconstexpr |
◆ insert()
| constexpr void real::detail::pc_set_cache::insert |
( |
const std::vector< std::int32_t > & |
pcs, |
|
|
std::uint32_t |
id |
|
) |
| |
|
inlineconstexpr |
◆ bucket_count
| constexpr std::size_t real::detail::pc_set_cache::bucket_count {2048} |
|
staticconstexpr |
◆ buckets
| std::vector<std::vector<std::uint32_t> > real::detail::pc_set_cache::buckets |
◆ not_found
| constexpr std::uint32_t real::detail::pc_set_cache::not_found {0xFFFFFFFFU} |
|
staticconstexpr |
The documentation for this struct was generated from the following file: