Moving MpiNode into MpiNode.h
This commit is contained in:
parent
aec5236eb1
commit
5bfcf4cd2c
2 changed files with 26 additions and 23 deletions
25
eo/src/mpi/MpiNode.h
Normal file
25
eo/src/mpi/MpiNode.h
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
# ifndef __MPI_NODE_H__
|
||||
# define __MPI_NODE_H__
|
||||
|
||||
# include <boost/mpi.hpp>
|
||||
namespace mpi = boost::mpi;
|
||||
|
||||
class MpiNode
|
||||
{
|
||||
public:
|
||||
|
||||
static void init( int argc, char** argv )
|
||||
{
|
||||
static mpi::environment env( argc, argv );
|
||||
}
|
||||
|
||||
static mpi::communicator& comm()
|
||||
{
|
||||
return _comm;
|
||||
}
|
||||
|
||||
protected:
|
||||
static mpi::communicator _comm;
|
||||
};
|
||||
|
||||
# endif // __MPI_NODE_H__
|
||||
|
|
@ -3,12 +3,9 @@
|
|||
|
||||
# include <vector>
|
||||
# include <map>
|
||||
|
||||
# include <boost/mpi.hpp>
|
||||
namespace mpi = boost::mpi;
|
||||
|
||||
# include <utils/eoLogger.h>
|
||||
|
||||
# include "MpiNode.h"
|
||||
# include "assignmentAlgorithm.h"
|
||||
// TODO TODOB comment!
|
||||
|
||||
|
|
@ -25,25 +22,6 @@ namespace EoMpi
|
|||
const int Finish = 1;
|
||||
}
|
||||
}
|
||||
|
||||
class MpiNode
|
||||
{
|
||||
public:
|
||||
|
||||
static void init( int argc, char** argv )
|
||||
{
|
||||
static mpi::environment env( argc, argv );
|
||||
}
|
||||
|
||||
static mpi::communicator& comm()
|
||||
{
|
||||
return _comm;
|
||||
}
|
||||
|
||||
protected:
|
||||
static mpi::communicator _comm;
|
||||
};
|
||||
|
||||
class MpiJob
|
||||
{
|
||||
public:
|
||||
|
|
|
|||
Reference in a new issue