summaryrefslogtreecommitdiff
path: root/boost/graph/distributed
diff options
context:
space:
mode:
Diffstat (limited to 'boost/graph/distributed')
-rw-r--r--boost/graph/distributed/adjacency_list.hpp24
-rw-r--r--boost/graph/distributed/adjlist/redistribute.hpp4
-rw-r--r--boost/graph/distributed/betweenness_centrality.hpp18
-rw-r--r--boost/graph/distributed/breadth_first_search.hpp2
-rw-r--r--boost/graph/distributed/compressed_sparse_row_graph.hpp299
-rw-r--r--boost/graph/distributed/dijkstra_shortest_paths.hpp11
-rw-r--r--boost/graph/distributed/page_rank.hpp1
7 files changed, 110 insertions, 249 deletions
diff --git a/boost/graph/distributed/adjacency_list.hpp b/boost/graph/distributed/adjacency_list.hpp
index d0bbbfe55f..264ede512e 100644
--- a/boost/graph/distributed/adjacency_list.hpp
+++ b/boost/graph/distributed/adjacency_list.hpp
@@ -1882,6 +1882,30 @@ namespace boost {
}
//---------------------------------------------------------------------
+ //---------------------------------------------------------------------
+ // Opposite of above.
+ edge_property_type split_edge_property(const base_edge_property_type& p)
+ { return split_edge_property(p, directed_selector()); }
+
+ edge_property_type
+ split_edge_property(const base_edge_property_type& p, directedS)
+ {
+ return p.m_base;
+ }
+
+ edge_property_type
+ split_edge_property(const base_edge_property_type& p, bidirectionalS)
+ {
+ return p.m_base;
+ }
+
+ edge_property_type
+ split_edge_property(const base_edge_property_type& p, undirectedS)
+ {
+ return p.m_base.m_base;
+ }
+ //---------------------------------------------------------------------
+
/** The set of messages that can be transmitted and received by
* a distributed adjacency list. This list will eventually be
* exhaustive, but is currently quite limited.
diff --git a/boost/graph/distributed/adjlist/redistribute.hpp b/boost/graph/distributed/adjlist/redistribute.hpp
index 064aaba191..5401f1240a 100644
--- a/boost/graph/distributed/adjlist/redistribute.hpp
+++ b/boost/graph/distributed/adjlist/redistribute.hpp
@@ -237,8 +237,8 @@ PBGL_DISTRIB_ADJLIST_TYPE
|| get(vertex_to_processor, src) != src.owner
|| get(vertex_to_processor, tgt) != tgt.owner)
redistributed_edges[get(vertex_to_processor, source(*ei, *this))]
- .push_back(redistributed_edge(*ei, get(edge_all_t(), base(),
- ei->local)));
+ .push_back(redistributed_edge(*ei, split_edge_property(get(edge_all_t(), base(),
+ ei->local))));
}
inplace_all_to_all(pg, redistributed_edges);
diff --git a/boost/graph/distributed/betweenness_centrality.hpp b/boost/graph/distributed/betweenness_centrality.hpp
index b6ca7d06ef..04d249a5b8 100644
--- a/boost/graph/distributed/betweenness_centrality.hpp
+++ b/boost/graph/distributed/betweenness_centrality.hpp
@@ -1389,7 +1389,7 @@ namespace graph { namespace parallel { namespace detail {
};
template<>
- struct brandes_betweenness_centrality_dispatch1<boost::detail::error_property_not_found>
+ struct brandes_betweenness_centrality_dispatch1<boost::param_not_found>
{
template<typename Graph, typename CentralityMap, typename EdgeCentralityMap,
typename VertexIndexMap, typename Buffer>
@@ -1397,7 +1397,7 @@ namespace graph { namespace parallel { namespace detail {
run(const Graph& g, CentralityMap centrality, EdgeCentralityMap edge_centrality_map,
VertexIndexMap vertex_index, Buffer sources,
typename graph_traits<Graph>::edges_size_type delta,
- boost::detail::error_property_not_found)
+ boost::param_not_found)
{
boost::graph::parallel::detail::brandes_betweenness_centrality_dispatch2(
g, centrality, edge_centrality_map, vertex_index, sources, delta);
@@ -1417,7 +1417,8 @@ brandes_betweenness_centrality(const Graph& g,
typedef queue<typename graph_traits<Graph>::vertex_descriptor> queue_t;
queue_t q;
- typedef typename property_value<named_params, edge_weight_t>::type ew;
+ typedef typename get_param_type<edge_weight_t, named_params>::type ew_param;
+ typedef typename detail::choose_impl_result<mpl::true_, Graph, ew_param, edge_weight_t>::type ew;
graph::parallel::detail::brandes_betweenness_centrality_dispatch1<ew>::run(
g,
choose_param(get_param(params, vertex_centrality),
@@ -1427,7 +1428,7 @@ brandes_betweenness_centrality(const Graph& g,
choose_const_pmap(get_param(params, vertex_index), g, vertex_index),
choose_param(get_param(params, buffer_param_t()), boost::ref(q)),
choose_param(get_param(params, lookahead_t()), 0),
- get_param(params, edge_weight));
+ choose_const_pmap(get_param(params, edge_weight), g, edge_weight));
}
template<typename Graph, typename CentralityMap>
@@ -1605,14 +1606,14 @@ namespace detail { namespace graph {
};
template<>
- struct non_distributed_brandes_betweenness_centrality_dispatch1<detail::error_property_not_found>
+ struct non_distributed_brandes_betweenness_centrality_dispatch1<param_not_found>
{
template<typename ProcessGroup, typename Graph, typename CentralityMap,
typename EdgeCentralityMap, typename VertexIndexMap, typename Buffer>
static void
run(const ProcessGroup& pg, const Graph& g, CentralityMap centrality,
EdgeCentralityMap edge_centrality_map, VertexIndexMap vertex_index,
- Buffer sources, detail::error_property_not_found)
+ Buffer sources, param_not_found)
{
non_distributed_brandes_betweenness_centrality_dispatch2(pg, g, centrality, edge_centrality_map,
vertex_index, sources);
@@ -1631,7 +1632,8 @@ non_distributed_brandes_betweenness_centrality(const ProcessGroup& pg, const Gra
typedef queue<int> queue_t;
queue_t q;
- typedef typename property_value<named_params, edge_weight_t>::type ew;
+ typedef typename get_param_type<edge_weight_t, named_params>::type ew_param;
+ typedef typename detail::choose_impl_result<mpl::true_, Graph, ew_param, edge_weight_t>::type ew;
detail::graph::non_distributed_brandes_betweenness_centrality_dispatch1<ew>::run(
pg, g,
choose_param(get_param(params, vertex_centrality),
@@ -1640,7 +1642,7 @@ non_distributed_brandes_betweenness_centrality(const ProcessGroup& pg, const Gra
dummy_property_map()),
choose_const_pmap(get_param(params, vertex_index), g, vertex_index),
choose_param(get_param(params, buffer_param_t()), boost::ref(q)),
- get_param(params, edge_weight));
+ choose_const_pmap(get_param(params, edge_weight), g, edge_weight));
}
template<typename ProcessGroup, typename Graph, typename CentralityMap>
diff --git a/boost/graph/distributed/breadth_first_search.hpp b/boost/graph/distributed/breadth_first_search.hpp
index c987585f5f..36e2df8bb7 100644
--- a/boost/graph/distributed/breadth_first_search.hpp
+++ b/boost/graph/distributed/breadth_first_search.hpp
@@ -118,7 +118,7 @@ namespace boost {
typename graph_traits<DistributedGraph>::vertex_descriptor s,
ColorMap color,
BFSVisitor vis,
- error_property_not_found,
+ boost::param_not_found,
VertexIndexMap vertex_index)
{
using boost::graph::parallel::process_group;
diff --git a/boost/graph/distributed/compressed_sparse_row_graph.hpp b/boost/graph/distributed/compressed_sparse_row_graph.hpp
index 01d32cfb88..33861c47b4 100644
--- a/boost/graph/distributed/compressed_sparse_row_graph.hpp
+++ b/boost/graph/distributed/compressed_sparse_row_graph.hpp
@@ -365,30 +365,22 @@ class compressed_sparse_row_graph<
// Directly access a vertex or edge bundle
vertex_bundled& operator[](vertex_descriptor v)
{
- std::pair<process_id_type, vertex_descriptor> locator
- = get(vertex_global, *this, v);
- BOOST_ASSERT(locator.first == process_id(m_process_group));
- return base().m_vertex_properties[locator.second];
+ return get(vertex_bundle, *this, v);
}
const vertex_bundled& operator[](vertex_descriptor v) const
{
- std::pair<process_id_type, vertex_descriptor> locator
- = get(vertex_global, *this, v);
- BOOST_ASSERT(locator.first == process_id(m_process_group));
- return base().m_process_group[locator.second];
+ return get(vertex_bundle, *this, v);
}
edge_bundled& operator[](edge_descriptor e)
{
- BOOST_ASSERT(get(vertex_owner, *this, e.src) == process_id(m_process_group));
- return base().m_edge_properties[e.idx];
+ return get(edge_bundle, *this, e);
}
const edge_bundled& operator[](edge_descriptor e) const
{
- BOOST_ASSERT(get(vertex_owner, *this, e.src) == process_id(m_process_group));
- return base().m_edge_properties[e.idx];
+ return get(edge_bundle, *this, e);
}
// Create a vertex descriptor from a process ID and a local index.
@@ -1757,19 +1749,22 @@ class csr_edge_global_map
public:
// -----------------------------------------------------------------
// Readable Property Map concept requirements
- typedef std::pair<ProcessID, EdgeIndex> value_type;
- typedef value_type reference;
typedef detail::csr_edge_descriptor<Vertex, EdgeIndex> key_type;
+ typedef std::pair<ProcessID, detail::csr_edge_descriptor<Vertex, EdgeIndex> > value_type;
+ typedef value_type reference;
typedef readable_property_map_tag category;
};
template<typename ProcessID, typename Vertex, typename EdgeIndex>
-inline std::pair<ProcessID, EdgeIndex>
+inline std::pair<ProcessID, detail::csr_edge_descriptor<Vertex, EdgeIndex> >
get(csr_edge_global_map<ProcessID, Vertex, EdgeIndex> pm,
typename csr_edge_global_map<ProcessID, Vertex, EdgeIndex>::key_type k)
{
const int local_index_bits = sizeof(Vertex) * CHAR_BIT - processor_bits;
- return std::pair<ProcessID, EdgeIndex>(k.src >> local_index_bits, k.idx);
+ const Vertex local_index_mask = Vertex(-1) >> processor_bits;
+ return std::pair<ProcessID, detail::csr_edge_descriptor<Vertex, EdgeIndex> >
+ ((k.src >> local_index_bits),
+ detail::csr_edge_descriptor<Vertex, EdgeIndex>(k.src & local_index_mask, k.idx));
}
template<BOOST_DISTRIB_CSR_GRAPH_TEMPLATE_PARMS>
@@ -1796,7 +1791,7 @@ get(edge_global_t, BOOST_DISTRIB_CSR_GRAPH_TYPE& g)
template<BOOST_DISTRIB_CSR_GRAPH_TEMPLATE_PARMS>
inline
std::pair<typename ProcessGroup::process_id_type,
- typename BOOST_DISTRIB_CSR_GRAPH_TYPE::edges_size_type>
+ typename BOOST_DISTRIB_CSR_GRAPH_TYPE::base_type::edge_descriptor>
get(edge_global_t, BOOST_DISTRIB_CSR_GRAPH_TYPE& g,
typename BOOST_DISTRIB_CSR_GRAPH_TYPE::edge_descriptor k)
{
@@ -1818,7 +1813,7 @@ get(edge_global_t, const BOOST_DISTRIB_CSR_GRAPH_TYPE& g)
template<BOOST_DISTRIB_CSR_GRAPH_TEMPLATE_PARMS>
inline
std::pair<typename ProcessGroup::process_id_type,
- typename BOOST_DISTRIB_CSR_GRAPH_TYPE::edges_size_type>
+ typename BOOST_DISTRIB_CSR_GRAPH_TYPE::base_type::edge_descriptor>
get(edge_global_t, const BOOST_DISTRIB_CSR_GRAPH_TYPE& g,
typename BOOST_DISTRIB_CSR_GRAPH_TYPE::edge_descriptor k)
{
@@ -1827,12 +1822,16 @@ get(edge_global_t, const BOOST_DISTRIB_CSR_GRAPH_TYPE& g,
const int local_index_bits =
sizeof(vertex_descriptor) * CHAR_BIT - processor_bits;
+ const typename BOOST_DISTRIB_CSR_GRAPH_TYPE::edges_size_type local_index_mask =
+ typename BOOST_DISTRIB_CSR_GRAPH_TYPE::edges_size_type(-1) >> processor_bits;
typedef std::pair<typename ProcessGroup::process_id_type,
- typename BOOST_DISTRIB_CSR_GRAPH_TYPE::edges_size_type>
+ typename BOOST_DISTRIB_CSR_GRAPH_TYPE::base_type::edge_descriptor>
result_type;
- return result_type(k.src >> local_index_bits, k.idx);
+ return result_type(k.src >> local_index_bits,
+ typename BOOST_DISTRIB_CSR_GRAPH_TYPE::base_type::edge_descriptor
+ (k.src & local_index_mask, k.idx));
}
// -----------------------------------------------------------------
@@ -1847,7 +1846,8 @@ class property_map<BOOST_DISTRIB_CSR_GRAPH_TYPE, edge_index_t>
typedef local_property_map<
typename BOOST_DISTRIB_CSR_GRAPH_TYPE::process_group_type,
global_map,
- identity_property_map> type;
+ typename property_map<typename BOOST_DISTRIB_CSR_GRAPH_TYPE::base_type, edge_index_t>::type
+ > type;
typedef type const_type;
};
@@ -1859,7 +1859,7 @@ get(edge_index_t, BOOST_DISTRIB_CSR_GRAPH_TYPE& g)
typedef typename property_map<BOOST_DISTRIB_CSR_GRAPH_TYPE, edge_index_t>
::type result_type;
return result_type(g.process_group(), get(edge_global, g),
- identity_property_map());
+ get(edge_index, g.base()));
}
template<BOOST_DISTRIB_CSR_GRAPH_TEMPLATE_PARMS>
@@ -1878,7 +1878,7 @@ get(edge_index_t, const BOOST_DISTRIB_CSR_GRAPH_TYPE& g)
typedef typename property_map<BOOST_DISTRIB_CSR_GRAPH_TYPE, edge_index_t>
::const_type result_type;
return result_type(g.process_group(), get(edge_global, g),
- identity_property_map());
+ get(edge_index, g.base()));
}
template<BOOST_DISTRIB_CSR_GRAPH_TEMPLATE_PARMS>
@@ -1889,229 +1889,67 @@ get(edge_index_t, const BOOST_DISTRIB_CSR_GRAPH_TYPE& g,
return k.idx;
}
-/* Common traits for getting vertex_bundle and edge_bundle maps */
-
-namespace detail {
- template <typename Graph, typename T> struct get_bundles;
-
- template<BOOST_DISTRIB_CSR_GRAPH_TEMPLATE_PARMS, typename T>
- class get_bundles<BOOST_DISTRIB_CSR_GRAPH_TYPE, T> {
- typedef BOOST_DISTRIB_CSR_GRAPH_TYPE Graph;
- typedef typename Graph::process_group_type process_group_type;
-
- // Extract the global property map for our key type.
- typedef typename property_map<Graph, vertex_global_t>::const_type vertex_global_map;
- typedef typename property_traits<vertex_global_map>::value_type vertex_locator;
- typedef typename property_map<Graph, edge_global_t>::const_type edge_global_map;
- typedef typename property_traits<edge_global_map>::value_type edge_locator;
-
- // Build the local property map
- typedef bundle_property_map<std::vector<VertexProperty>,
- typename vertex_locator::second_type,
- VertexProperty,
- T> vertex_local_pmap;
-
- // Build the local const property map
- typedef bundle_property_map<const std::vector<VertexProperty>,
- typename vertex_locator::second_type,
- VertexProperty,
- const T> vertex_local_const_pmap;
-
- // Build the local property map
- typedef bundle_property_map<std::vector<EdgeProperty>,
- typename edge_locator::second_type,
- EdgeProperty,
- T> edge_local_pmap;
-
- // Build the local const property map
- typedef bundle_property_map<const std::vector<EdgeProperty>,
- typename edge_locator::second_type,
- EdgeProperty,
- const T> edge_local_const_pmap;
-
- public:
- typedef ::boost::parallel::distributed_property_map<
- process_group_type, vertex_global_map, vertex_local_pmap> vertex_map_type;
-
- typedef ::boost::parallel::distributed_property_map<
- process_group_type, vertex_global_map, vertex_local_const_pmap> vertex_map_const_type;
-
- typedef ::boost::parallel::distributed_property_map<
- process_group_type, edge_global_map, edge_local_pmap> edge_map_type;
-
- typedef ::boost::parallel::distributed_property_map<
- process_group_type, edge_global_map, edge_local_const_pmap> edge_map_const_type;
-
- };
-
- template <typename Graph> struct get_full_bundles;
-
- template<BOOST_DISTRIB_CSR_GRAPH_TEMPLATE_PARMS>
- class get_full_bundles<BOOST_DISTRIB_CSR_GRAPH_TYPE> { // For vertex_bundle_t and edge_bundle_t
- typedef BOOST_DISTRIB_CSR_GRAPH_TYPE Graph;
- typedef typename Graph::process_group_type process_group_type;
-
- // Extract the global property map for our key type.
- typedef typename property_map<Graph, vertex_global_t>::const_type vertex_global_map;
- typedef typename property_traits<vertex_global_map>::value_type vertex_locator;
- typedef typename property_map<Graph, edge_global_t>::const_type edge_global_map;
- typedef typename property_traits<edge_global_map>::value_type edge_locator;
-
- // Build the local property maps
- typedef typename property_map<typename Graph::base_type, vertex_bundle_t>::type vertex_local_pmap;
- typedef typename property_map<typename Graph::base_type, vertex_bundle_t>::const_type vertex_local_const_pmap;
- typedef typename property_map<typename Graph::base_type, edge_bundle_t>::type edge_local_pmap;
- typedef typename property_map<typename Graph::base_type, edge_bundle_t>::const_type edge_local_const_pmap;
-
- public:
- typedef ::boost::parallel::distributed_property_map<
- process_group_type, vertex_global_map, vertex_local_pmap> vertex_map_type;
-
- typedef ::boost::parallel::distributed_property_map<
- process_group_type, vertex_global_map, vertex_local_const_pmap> vertex_map_const_type;
-
- typedef ::boost::parallel::distributed_property_map<
- process_group_type, edge_global_map, edge_local_pmap> edge_map_type;
-
- typedef ::boost::parallel::distributed_property_map<
- process_group_type, edge_global_map, edge_local_const_pmap> edge_map_const_type;
-
- };
-}
-
-template<BOOST_DISTRIB_CSR_GRAPH_TEMPLATE_PARMS>
-struct property_map<BOOST_DISTRIB_CSR_GRAPH_TYPE, vertex_bundle_t>
-{
- typedef typename detail::get_full_bundles<BOOST_DISTRIB_CSR_GRAPH_TYPE>::vertex_map_type type;
- typedef typename detail::get_full_bundles<BOOST_DISTRIB_CSR_GRAPH_TYPE>::vertex_map_const_type const_type;
-};
-
-template<BOOST_DISTRIB_CSR_GRAPH_TEMPLATE_PARMS>
-struct property_map<BOOST_DISTRIB_CSR_GRAPH_TYPE, edge_bundle_t>
-{
- typedef typename detail::get_full_bundles<BOOST_DISTRIB_CSR_GRAPH_TYPE>::edge_map_type type;
- typedef typename detail::get_full_bundles<BOOST_DISTRIB_CSR_GRAPH_TYPE>::edge_map_const_type const_type;
-};
-
-// -----------------------------------------------------------------
-// Bundled Properties
-template<BOOST_DISTRIB_CSR_GRAPH_TEMPLATE_PARMS, typename T, typename Bundle>
-class property_map<BOOST_DISTRIB_CSR_GRAPH_TYPE, T Bundle::*>
-{
- typedef BOOST_DISTRIB_CSR_GRAPH_TYPE Graph;
- typedef typename Graph::process_group_type process_group_type;
+template <BOOST_DISTRIB_CSR_GRAPH_TEMPLATE_PARMS, typename Tag>
+class property_map<BOOST_DISTRIB_CSR_GRAPH_TYPE, Tag> {
+ typedef BOOST_DISTRIB_CSR_GRAPH_TYPE graph_type;
+ typedef typename graph_type::process_group_type process_group_type;
+ typedef typename graph_type::base_type base_graph_type;
+ typedef typename property_map<base_graph_type, Tag>::type
+ local_pmap;
+ typedef typename property_map<base_graph_type, Tag>::const_type
+ local_const_pmap;
+
+ typedef graph_traits<graph_type> traits;
+ typedef typename graph_traits<base_graph_type>::vertex_descriptor local_vertex;
+ typedef typename property_traits<local_pmap>::key_type local_key_type;
+
+ typedef typename property_traits<local_pmap>::value_type value_type;
+
+ typedef typename property_map<graph_type, vertex_global_t>::const_type
+ vertex_global_map;
+ typedef typename property_map<graph_type, edge_global_t>::const_type
+ edge_global_map;
+
+ typedef typename mpl::if_<is_same<typename detail::property_kind_from_graph<base_graph_type, Tag>::type,
+ vertex_property_tag>,
+ vertex_global_map, edge_global_map>::type
+ global_map;
public:
- typedef typename mpl::if_<detail::is_vertex_bundle<VertexProperty,
- EdgeProperty,
- Bundle>,
- typename detail::get_bundles<BOOST_DISTRIB_CSR_GRAPH_TYPE, T>::vertex_map_type,
- typename detail::get_bundles<BOOST_DISTRIB_CSR_GRAPH_TYPE, T>::edge_map_type>
- ::type type;
-
- typedef typename mpl::if_<detail::is_vertex_bundle<VertexProperty,
- EdgeProperty,
- Bundle>,
- typename detail::get_bundles<BOOST_DISTRIB_CSR_GRAPH_TYPE, T>::vertex_map_const_type,
- typename detail::get_bundles<BOOST_DISTRIB_CSR_GRAPH_TYPE, T>::edge_map_const_type>
- ::type const_type;
-};
-
-namespace detail {
- // Retrieve the local bundle_property_map corresponding to a
- // non-const vertex property.
- template<typename Graph, typename T, typename Bundle>
- inline bundle_property_map<std::vector<typename Graph::vertex_bundled>,
- typename Graph::vertex_descriptor,
- typename Graph::vertex_bundled, T>
- get_distrib_csr_bundle(T Bundle::* p, Graph& g, mpl::true_)
- {
- typedef bundle_property_map<std::vector<typename Graph::vertex_bundled>,
- typename Graph::vertex_descriptor,
- typename Graph::vertex_bundled, T> result_type;
- return result_type(&g.base().vertex_properties().m_vertex_properties, p);
- }
-
- // Retrieve the local bundle_property_map corresponding to a
- // const vertex property.
- template<typename Graph, typename T, typename Bundle>
- inline bundle_property_map<const std::vector<typename Graph::vertex_bundled>,
- typename Graph::vertex_descriptor,
- typename Graph::vertex_bundled, const T>
- get_distrib_csr_bundle(T Bundle::* p, const Graph& g, mpl::true_)
- {
- typedef bundle_property_map<
- const std::vector<typename Graph::vertex_bundled>,
- typename Graph::vertex_descriptor,
- typename Graph::vertex_bundled, const T> result_type;
- return result_type(&g.base().vertex_properties().m_vertex_properties, p);
- }
+ typedef ::boost::parallel::distributed_property_map<
+ process_group_type, global_map, local_pmap> type;
- // Retrieve the local bundle_property_map corresponding to a
- // non-const edge property.
- template<typename Graph, typename T, typename Bundle>
- inline bundle_property_map<std::vector<typename Graph::edge_bundled>,
- typename Graph::edges_size_type,
- typename Graph::edge_bundled, T>
- get_distrib_csr_bundle(T Bundle::* p, Graph& g, mpl::false_)
- {
- typedef bundle_property_map<std::vector<typename Graph::edge_bundled>,
- typename Graph::edges_size_type,
- typename Graph::edge_bundled, T> result_type;
- return result_type(&g.base().edge_properties().m_edge_properties, p);
- }
-
- // Retrieve the local bundle_property_map corresponding to a
- // const edge property.
- template<typename Graph, typename T, typename Bundle>
- inline bundle_property_map<const std::vector<typename Graph::edge_bundled>,
- typename Graph::edges_size_type,
- typename Graph::edge_bundled, const T>
- get_distrib_csr_bundle(T Bundle::* p, const Graph& g, mpl::false_)
- {
- typedef bundle_property_map<
- const std::vector<typename Graph::edge_bundled>,
- typename Graph::edges_size_type,
- typename Graph::edge_bundled, const T> result_type;
- return result_type(&g.base().edge_properties().m_edge_properties, p);
- }
-}
+ typedef ::boost::parallel::distributed_property_map<
+ process_group_type, global_map, local_const_pmap> const_type;
+};
-template<BOOST_DISTRIB_CSR_GRAPH_TEMPLATE_PARMS, typename T, typename Bundle>
-typename property_map<BOOST_DISTRIB_CSR_GRAPH_TYPE, T Bundle::*>::type
-get(T Bundle::* p, BOOST_DISTRIB_CSR_GRAPH_TYPE& g)
+template <BOOST_DISTRIB_CSR_GRAPH_TEMPLATE_PARMS, typename Tag>
+typename property_map<BOOST_DISTRIB_CSR_GRAPH_TYPE, Tag>::type
+get(Tag tag, BOOST_DISTRIB_CSR_GRAPH_TYPE& g)
{
typedef BOOST_DISTRIB_CSR_GRAPH_TYPE Graph;
- typedef typename property_map<Graph, T Bundle::*>::type result_type;
-
- // Resolver
+ typedef typename property_map<Graph, Tag>::type result_type;
typedef typename property_traits<result_type>::value_type value_type;
- typedef typename property_reduce<T Bundle::*>::template apply<value_type>
+ typedef typename property_reduce<Tag>::template apply<value_type>
reduce;
- typedef typename property_traits<result_type>::key_type descriptor;
- typedef typename graph_traits<Graph>::vertex_descriptor vertex_descriptor;
- typedef typename mpl::if_<is_same<descriptor, vertex_descriptor>,
+ typedef typename mpl::if_<is_same<typename detail::property_kind_from_graph<Graph, Tag>::type,
+ vertex_property_tag>,
vertex_global_t, edge_global_t>::type
global_map_t;
return result_type(g.process_group(), get(global_map_t(), g),
- detail::get_distrib_csr_bundle
- (p, g, mpl::bool_<is_same<descriptor,
- vertex_descriptor>::value>()),
- reduce());
+ get(tag, g.base()), reduce());
}
-template<BOOST_DISTRIB_CSR_GRAPH_TEMPLATE_PARMS, typename T, typename Bundle>
-typename property_map<BOOST_DISTRIB_CSR_GRAPH_TYPE, T Bundle::*>::const_type
-get(T Bundle::* p, const BOOST_DISTRIB_CSR_GRAPH_TYPE& g)
+template<BOOST_DISTRIB_CSR_GRAPH_TEMPLATE_PARMS, typename Tag>
+typename property_map<BOOST_DISTRIB_CSR_GRAPH_TYPE, Tag>::const_type
+get(Tag tag, const BOOST_DISTRIB_CSR_GRAPH_TYPE& g)
{
typedef BOOST_DISTRIB_CSR_GRAPH_TYPE Graph;
- typedef typename property_map<Graph, T Bundle::*>::const_type result_type;
-
- // Resolver
+ typedef typename property_map<Graph, Tag>::const_type result_type;
typedef typename property_traits<result_type>::value_type value_type;
- typedef typename property_reduce<T Bundle::*>::template apply<value_type>
+ typedef typename property_reduce<Tag>::template apply<value_type>
reduce;
typedef typename property_traits<result_type>::key_type descriptor;
@@ -2121,10 +1959,7 @@ get(T Bundle::* p, const BOOST_DISTRIB_CSR_GRAPH_TYPE& g)
global_map_t;
return result_type(g.process_group(), get(global_map_t(), g),
- detail::get_distrib_csr_bundle
- (p, g, mpl::bool_<is_same<descriptor,
- vertex_descriptor>::value>()),
- reduce());
+ get(tag, g.base()), reduce());
}
namespace mpi {
diff --git a/boost/graph/distributed/dijkstra_shortest_paths.hpp b/boost/graph/distributed/dijkstra_shortest_paths.hpp
index f72fa11a50..acfd194400 100644
--- a/boost/graph/distributed/dijkstra_shortest_paths.hpp
+++ b/boost/graph/distributed/dijkstra_shortest_paths.hpp
@@ -49,7 +49,7 @@ namespace boost {
};
template<>
- struct parallel_dijkstra_impl2< ::boost::detail::error_property_not_found >
+ struct parallel_dijkstra_impl2< ::boost::param_not_found >
{
template<typename DistributedGraph, typename DijkstraVisitor,
typename PredecessorMap, typename DistanceMap,
@@ -60,7 +60,7 @@ namespace boost {
run(const DistributedGraph& g,
typename graph_traits<DistributedGraph>::vertex_descriptor s,
PredecessorMap predecessor, DistanceMap distance,
- ::boost::detail::error_property_not_found,
+ ::boost::param_not_found,
WeightMap weight, IndexMap index_map, ColorMap color_map,
Compare compare, Combine combine, DistInf inf, DistZero zero,
DijkstraVisitor vis)
@@ -95,7 +95,7 @@ namespace boost {
};
template<>
- struct parallel_dijkstra_impl< ::boost::detail::error_property_not_found >
+ struct parallel_dijkstra_impl< ::boost::param_not_found >
{
private:
template<typename DistributedGraph, typename DijkstraVisitor,
@@ -131,7 +131,7 @@ namespace boost {
typename graph_traits<DistributedGraph>::vertex_descriptor s,
PredecessorMap predecessor, DistanceMap distance,
Lookahead lookahead, WeightMap weight, IndexMap index_map,
- ::boost::detail::error_property_not_found,
+ ::boost::param_not_found,
Compare compare, Combine combine, DistInf inf, DistZero zero,
DijkstraVisitor vis)
{
@@ -190,8 +190,7 @@ namespace boost {
IndexMap> DefColorMap;
DefColorMap color_map(color.begin(), index_map);
- typedef typename property_value< bgl_named_params<T, Tag, Base>,
- vertex_color_t>::type color_map_type;
+ typedef typename get_param_type< vertex_color_t, bgl_named_params<T, Tag, Base> >::type color_map_type;
graph::detail::parallel_dijkstra_impl<color_map_type>
::run(g, s, predecessor, distance,
diff --git a/boost/graph/distributed/page_rank.hpp b/boost/graph/distributed/page_rank.hpp
index c2c230d387..1fc43ed683 100644
--- a/boost/graph/distributed/page_rank.hpp
+++ b/boost/graph/distributed/page_rank.hpp
@@ -93,6 +93,7 @@ page_rank_impl(const Graph& g, RankMap rank_map, Done done,
::const_type vertex_owner_map;
typename property_map<Graph, vertex_owner_t>::const_type
owner = get(vertex_owner, g);
+ (void)owner;
typedef typename boost::graph::parallel::process_group_type<Graph>
::type process_group_type;