Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r65764 - in trunk: boost/graph/distributed libs/graph_parallel/test
From: asutton_at_[hidden]
Date: 2010-10-05 12:32:29


Author: asutton
Date: 2010-10-05 12:32:27 EDT (Tue, 05 Oct 2010)
New Revision: 65764
URL: http://svn.boost.org/trac/boost/changeset/65764

Log:
Adding bundled graph properties to distributed graph types.

Text files modified:
   trunk/boost/graph/distributed/adjacency_list.hpp | 7 +++++++
   trunk/boost/graph/distributed/compressed_sparse_row_graph.hpp | 6 ++++++
   trunk/libs/graph_parallel/test/process_group_serialization.cpp | 4 ++++
   3 files changed, 17 insertions(+), 0 deletions(-)

Modified: trunk/boost/graph/distributed/adjacency_list.hpp
==============================================================================
--- trunk/boost/graph/distributed/adjacency_list.hpp (original)
+++ trunk/boost/graph/distributed/adjacency_list.hpp 2010-10-05 12:32:27 EDT (Tue, 05 Oct 2010)
@@ -1371,6 +1371,7 @@
     typedef typename inherited::graph_property_type graph_property_type;
     typedef typename inherited::vertex_bundled vertex_bundled;
     typedef typename inherited::edge_bundled edge_bundled;
+ typedef typename inherited::graph_bundled graph_bundled;
 
     typedef typename container_gen<edge_list_selector, edge_descriptor>::type
       local_edge_list_type;
@@ -1713,6 +1714,12 @@
       return base()[e.local];
     }
 
+ graph_bundled& operator[](graph_bundle_t)
+ { return get_property(*this); }
+
+ graph_bundled const& operator[](graph_bundle_t) const
+ { return get_property(*this); }
+
     template<typename OStreamConstructibleArchive>
     void save(std::string const& filename) const;
 

Modified: trunk/boost/graph/distributed/compressed_sparse_row_graph.hpp
==============================================================================
--- trunk/boost/graph/distributed/compressed_sparse_row_graph.hpp (original)
+++ trunk/boost/graph/distributed/compressed_sparse_row_graph.hpp 2010-10-05 12:32:27 EDT (Tue, 05 Oct 2010)
@@ -129,14 +129,20 @@
 
   // -----------------------------------------------------------------
   // Workarounds
+ // NOTE: This graph type does not have old-style graph properties. It only
+ // accepts bundles.
   typedef no_property vertex_property_type;
   typedef no_property edge_property_type;
+ typedef no_property graph_property_type;
   typedef typename mpl::if_<is_void<VertexProperty>,
                             void****,
                             VertexProperty>::type vertex_bundled;
   typedef typename mpl::if_<is_void<EdgeProperty>,
                             void****,
                             EdgeProperty>::type edge_bundled;
+ typedef typename mpl::if_<is_void<GraphProperty>,
+ void****,
+ GraphProperty>::type graph_bundled;
 
   // -----------------------------------------------------------------
   // Useful types

Modified: trunk/libs/graph_parallel/test/process_group_serialization.cpp
==============================================================================
--- trunk/libs/graph_parallel/test/process_group_serialization.cpp (original)
+++ trunk/libs/graph_parallel/test/process_group_serialization.cpp 2010-10-05 12:32:27 EDT (Tue, 05 Oct 2010)
@@ -7,6 +7,10 @@
 // Authors: Douglas Gregor
 // Andrew Lumsdaine
 
+// FIXME: Including because of a missing header in the serialization library.
+// Patch sent to list...
+#include <cassert>
+
 #include <boost/graph/use_mpi.hpp>
 #include <boost/config.hpp>
 #include <boost/throw_exception.hpp>


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk