mirror of
https://github.com/VectorCamp/vectorscan.git
synced 2025-06-28 16:41:01 +03:00
limex_compile: use small_color_map
This commit is contained in:
parent
a1ff4d3293
commit
48f9a6d518
@ -55,6 +55,7 @@
|
|||||||
#include "util/container.h"
|
#include "util/container.h"
|
||||||
#include "util/graph.h"
|
#include "util/graph.h"
|
||||||
#include "util/graph_range.h"
|
#include "util/graph_range.h"
|
||||||
|
#include "util/graph_small_color_map.h"
|
||||||
#include "util/order_check.h"
|
#include "util/order_check.h"
|
||||||
#include "util/verify_types.h"
|
#include "util/verify_types.h"
|
||||||
#include "util/ue2_containers.h"
|
#include "util/ue2_containers.h"
|
||||||
@ -544,11 +545,9 @@ void filterAccelStates(NGHolder &g, const map<u32, set<NFAVertex>> &tops,
|
|||||||
ue2::unordered_map<NFAVertex, AccelScheme> out;
|
ue2::unordered_map<NFAVertex, AccelScheme> out;
|
||||||
|
|
||||||
try {
|
try {
|
||||||
vector<boost::default_color_type> colour(num_vertices(g));
|
|
||||||
boost::breadth_first_search(g, g.start,
|
boost::breadth_first_search(g, g.start,
|
||||||
visitor(fas_visitor(*accel_map, &out))
|
visitor(fas_visitor(*accel_map, &out))
|
||||||
.color_map(make_iterator_property_map(colour.begin(),
|
.color_map(make_small_color_map(g)));
|
||||||
get(vertex_index, g))));
|
|
||||||
} catch (fas_visitor *) {
|
} catch (fas_visitor *) {
|
||||||
; /* found max accel_states */
|
; /* found max accel_states */
|
||||||
}
|
}
|
||||||
@ -1615,9 +1614,7 @@ bool cannotDie(const build_info &args, const set<NFAVertex> &tops) {
|
|||||||
// top, looking for a cyclic path consisting of vertices of dot reach. If
|
// top, looking for a cyclic path consisting of vertices of dot reach. If
|
||||||
// one exists, than the NFA cannot die after this top is triggered.
|
// one exists, than the NFA cannot die after this top is triggered.
|
||||||
|
|
||||||
vector<boost::default_color_type> colours(num_vertices(h));
|
auto colour_map = make_small_color_map(h);
|
||||||
auto colour_map = boost::make_iterator_property_map(colours.begin(),
|
|
||||||
get(vertex_index, h));
|
|
||||||
|
|
||||||
struct CycleFound {};
|
struct CycleFound {};
|
||||||
struct CannotDieVisitor : public boost::default_dfs_visitor {
|
struct CannotDieVisitor : public boost::default_dfs_visitor {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user