Update of /cvsroot/boost/boost/libs/mpi/test
In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv28215/libs/mpi/test
Modified Files:
graph_topology_test.cpp
Log Message:
Create a separate graph_communicator type to handle graph topologies
Index: graph_topology_test.cpp
===================================================================
RCS file: /cvsroot/boost/boost/libs/mpi/test/graph_topology_test.cpp,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- graph_topology_test.cpp 1 Jun 2007 16:56:43 -0000 1.1
+++ graph_topology_test.cpp 5 Jun 2007 00:54:56 -0000 1.2
@@ -11,7 +11,7 @@
// verifies that the same data makes it all the way. Should test all
// of the various kinds of data that can be sent (primitive types, POD
// types, serializable objects, etc.)
-#include <boost/mpi/graph_topology.hpp>
+#include <boost/mpi/graph_communicator.hpp>
#include <boost/mpi/communicator.hpp>
#include <boost/mpi/environment.hpp>
#include <boost/graph/adjacency_list.hpp>
@@ -26,14 +26,15 @@
#include <boost/mpi/collectives/broadcast.hpp>
using boost::mpi::communicator;
+using boost::mpi::graph_communicator;
using namespace boost;
int test_main(int argc, char* argv[])
{
- boost::function_requires< IncidenceGraphConcept<communicator> >();
- boost::function_requires< AdjacencyGraphConcept<communicator> >();
- boost::function_requires< VertexListGraphConcept<communicator> >();
- boost::function_requires< EdgeListGraphConcept<communicator> >();
+ boost::function_requires< IncidenceGraphConcept<graph_communicator> >();
+ boost::function_requires< AdjacencyGraphConcept<graph_communicator> >();
+ boost::function_requires< VertexListGraphConcept<graph_communicator> >();
+ boost::function_requires< EdgeListGraphConcept<graph_communicator> >();
double prob = 0.1;
@@ -89,8 +90,7 @@
}
// Create a communicator with a topology equivalent to the graph
- communicator graph_comm = world.with_graph_topology(graph, false,
- graph_alt_index);
+ graph_communicator graph_comm(world, graph, graph_alt_index, false);
// The communicator's topology should have the same number of
// vertices and edges and the original graph
@@ -100,15 +100,15 @@
// Display the communicator graph
if (graph_comm.rank() == 0) {
std::cout << "Communicator graph:\n";
- BGL_FORALL_VERTICES(v, graph_comm, communicator) {
- BGL_FORALL_OUTEDGES(v, e, graph_comm, communicator) {
+ BGL_FORALL_VERTICES(v, graph_comm, graph_communicator) {
+ BGL_FORALL_OUTEDGES(v, e, graph_comm, graph_communicator) {
std::cout << source(e, graph_comm) << " -> " << target(e, graph_comm)
<< std::endl;
}
}
std::cout << "Communicator graph via edges():\n";
- BGL_FORALL_EDGES(e, graph_comm, communicator)
+ BGL_FORALL_EDGES(e, graph_comm, graph_communicator)
std::cout << source(e, graph_comm) << " -> " << target(e, graph_comm)
<< std::endl;
}
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Boost-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/boost-cvs