Exemplo n.º 1
0
    void parallel_bfs_helper
      (DistributedGraph& g,
       typename graph_traits<DistributedGraph>::vertex_descriptor s,
       ColorMap color,
       BFSVisitor vis,
       pdalboost::param_not_found,
       VertexIndexMap vertex_index)
    {
      using pdalboost::graph::parallel::process_group;

      typedef graph_traits<DistributedGraph> Traits;
      typedef typename Traits::vertex_descriptor Vertex;
      typedef typename pdalboost::graph::parallel::process_group_type<DistributedGraph>::type 
        process_group_type;

      set_property_map_role(vertex_color, color);
      color.set_consistency_model(0);

      // Buffer default
      typedef typename property_map<DistributedGraph, vertex_owner_t>
        ::const_type vertex_owner_map;
      typedef pdalboost::graph::distributed::distributed_queue<
                process_group_type, vertex_owner_map, queue<Vertex>, 
                detail::darken_and_push<ColorMap> > queue_t;
      queue_t Q(process_group(g),
                get(vertex_owner, g),
                detail::darken_and_push<ColorMap>(color));
      breadth_first_search(g, s, Q, vis, color);
    }
Exemplo n.º 2
0
 inline void
 parallel_bfs_helper
   (DistributedGraph& g,
    typename graph_traits<DistributedGraph>::vertex_descriptor s,
    ColorMap color,
    BFSVisitor vis,
    BufferRef Q,
    VertexIndexMap)
 {
   set_property_map_role(vertex_color, color);
   color.set_consistency_model(0);
   breadth_first_search(g, s, Q.ref, vis, color);
 }