Update of /cvsroot/boost/boost/libs/mpi/src
In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv2918/libs/mpi/src

Modified Files:
        communicator.cpp 
Log Message:
Document graph topologies, implement layer over MPI_Topo_test

Index: communicator.cpp
===================================================================
RCS file: /cvsroot/boost/boost/libs/mpi/src/communicator.cpp,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- communicator.cpp    31 May 2007 16:02:07 -0000      1.2
+++ communicator.cpp    1 Jun 2007 18:22:00 -0000       1.3
@@ -141,6 +141,22 @@
   return communicator(newcomm, comm_take_ownership);
 }
 
+bool communicator::has_cartesian_topology() const
+{
+  int status;
+  BOOST_MPI_CHECK_RESULT(MPI_Topo_test, ((MPI_Comm)*this, &status));
+
+  return status == MPI_CART;
+}
+
+bool communicator::has_graph_topology() const
+{
+  int status;
+  BOOST_MPI_CHECK_RESULT(MPI_Topo_test, ((MPI_Comm)*this, &status));
+
+  return status == MPI_GRAPH;
+}
+
 void communicator::abort(int errcode) const
 {
   BOOST_MPI_CHECK_RESULT(MPI_Abort, (MPI_Comm(*this), errcode));


-------------------------------------------------------------------------
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

Reply via email to