/*
- * Copyright (c) 2015-2017, Intel Corporation
+ * Copyright (c) 2015-2018, Intel Corporation
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
return true; /* failure is not yet an option */
}
-
static
bool prepAcceptForAddAnchoredNFA(RoseBuildImpl &tbi, const NGHolder &w,
- u32 max_adj, NFAVertex u,
+ NFAVertex u,
const vector<DepthMinMax> &vertexDepths,
map<u32, DepthMinMax> &depthMap,
- map<NFAVertex, set<u32> > &reportMap,
+ map<NFAVertex, set<u32>> &reportMap,
map<ReportID, u32> &allocated_reports,
flat_set<u32> &added_lit_ids) {
const depth max_anchored_depth(tbi.cc.grey.maxAnchoredRegion);
depthMap[lit_id] = unionDepthMinMax(depthMap[lit_id], d);
}
- if (depthMap[lit_id].max + depth(max_adj) > max_anchored_depth) {
+ if (depthMap[lit_id].max > max_anchored_depth) {
DEBUG_PRINTF("depth=%s exceeds maxAnchoredRegion=%u\n",
- (depthMap[lit_id].max + depth(max_adj)).str().c_str(),
+ depthMap[lit_id].max.str().c_str(),
tbi.cc.grey.maxAnchoredRegion);
return false;
}
flat_set<u32> added_lit_ids; /* literal ids added for this NFA */
for (auto v : inv_adjacent_vertices_range(h.accept, h)) {
- if (!prepAcceptForAddAnchoredNFA(*this, h, 0, v, vertexDepths, depthMap,
+ if (!prepAcceptForAddAnchoredNFA(*this, h, v, vertexDepths, depthMap,
reportMap, allocated_reports,
added_lit_ids)) {
removeAddedLiterals(*this, added_lit_ids);
if (v == h.accept) {
continue;
}
- if (!prepAcceptForAddAnchoredNFA(*this, h, 0, v, vertexDepths, depthMap,
+ if (!prepAcceptForAddAnchoredNFA(*this, h, v, vertexDepths, depthMap,
reportMap, allocated_reports_eod,
added_lit_ids)) {
removeAddedLiterals(*this, added_lit_ids);