REAL
Regular Expression Algorithmic Library — constexpr C++20 regex
Loading...
Searching...
No Matches
real::detail::visit_marks Struct Reference

The pcs one closure computation has entered, by generation: starting one bumps the generation instead of clearing per pc, so a cache miss costs its closure, not the program's size (a large alternation's byte program runs to hundreds of thousands of instructions). More...

#include <lazy_dfa.hpp>

Public Member Functions

constexpr void begin (std::size_t size)
 Starts a computation over size pcs: none is entered yet.
 
constexpr bool test (std::int32_t pc) const
 Whether pc was entered in this computation.
 
constexpr void set (std::int32_t pc)
 Marks pc entered in this computation.
 

Public Attributes

std::vector< std::uint32_t > mark
 Per pc: the generation that last entered it.
 
std::uint32_t gen {0}
 The current computation's generation.
 

Detailed Description

The pcs one closure computation has entered, by generation: starting one bumps the generation instead of clearing per pc, so a cache miss costs its closure, not the program's size (a large alternation's byte program runs to hundreds of thousands of instructions).

Member Function Documentation

◆ begin()

constexpr void real::detail::visit_marks::begin ( std::size_t  size)
inlineconstexpr

Starts a computation over size pcs: none is entered yet.

Parameters
[in]sizeThe program's size.

◆ set()

constexpr void real::detail::visit_marks::set ( std::int32_t  pc)
inlineconstexpr

Marks pc entered in this computation.

Parameters
[in]pcThe pc.

◆ test()

constexpr bool real::detail::visit_marks::test ( std::int32_t  pc) const
inlineconstexpr

Whether pc was entered in this computation.

Parameters
[in]pcThe pc.
Returns
True when it was.

The documentation for this struct was generated from the following file: