12 #pragma GCC diagnostic push
13 #pragma GCC diagnostic ignored "-Wmaybe-uninitialized"
14 #include <boost/graph/depth_first_search.hpp>
15 #pragma GCC diagnostic pop
38 using std::pair<I, I>::pair;
72 boost::get_property(graph, boost::graph_name) =
context.processName();
76 for (
size_t i = 0;
i <
size; ++
i)
77 boost::add_vertex(graph);
80 std::vector<unsigned int>
modules;
101 std::vector<PathType>
paths;
103 for (
unsigned int i = 0;
i <
size; ++
i) {
104 std::vector<unsigned int>
modules;
114 std::vector<PathType> endPaths;
115 endPaths.reserve(
size);
116 for (
unsigned int i = 0;
i <
size; ++
i) {
117 std::vector<unsigned int>
modules;
156 std::vector<unsigned int>
colors(boost::num_vertices(
graph_));
157 auto colormap = boost::make_container_vertex_map(
colors);
160 boost::default_dfs_visitor visitor;
161 boost::depth_first_visit(
graph_,
module, visitor, colormap);
165 unsigned int size = 0;
166 for (
unsigned int color :
colors)
167 if (boost::black_color == color)
171 for (
unsigned int i = 0;
i <
colors.size(); ++
i)
172 if (boost::black_color ==
colors[
i])
185 std::vector<unsigned int>
const&
path) {
186 std::vector<unsigned int>
colors(boost::num_vertices(
graph_));
187 auto colormap = boost::make_container_vertex_map(
colors);
190 boost::default_dfs_visitor visitor;
192 boost::depth_first_visit(
graph_,
module, visitor, colormap);
194 unsigned int size = 0;
195 for (
unsigned int color :
colors)
206 for (
unsigned int& color :
colors)
210 struct record_vertices : boost::default_dfs_visitor {
211 record_vertices(std::vector<unsigned int>&
vertices) : vertices_(
vertices) {}
215 std::vector<unsigned int>& vertices_;
222 boost::depth_first_visit(
graph_,
module, recorder, colormap);
232 static unsigned int s_id = 0;
237 <<
"ProcessCallGraph::preBeginJob(): called for subprocess \"" <<
context.processName() <<
"\""
238 <<
" before being called for its parent process \"" <<
context.parentProcessContext().processName() <<
"\"";
245 <<
"ProcessCallGraph::preBeginJob(): called twice for the same "
246 << (
context.isSubProcess() ?
"subprocess" :
"process") <<
" " <<
context.processName();
259 <<
"ProcessCallGraph::processId(): unexpected " << (
context.isSubProcess() ?
"subprocess" :
"process") <<
" "
270 <<
"ProcessCallGraph::processId(): unexpected (sub)process " <<
processName;