Main Page | Namespace List | Class Hierarchy | Data Structures | Directories | File List | Data Fields | Globals

mpi_network.h

Go to the documentation of this file.
00001 
00005 class network
00006 {
00007 public:
00013         static void init(int &_argc, char** &_argv)
00014         {
00015                 MPI_Init(&_argc, &_argv);
00016         }
00020         static void finalize()
00021         {
00022                 MPI_Finalize();
00023         }
00028         static void time(double &_t)
00029         {
00030                 _t = MPI_Wtime();
00031         }
00036         static void rank(int &_rank)
00037         {
00038                 MPI_Comm_rank(MPI_COMM_WORLD, &_rank);
00039         }
00044         static void size(int &_size)
00045         {
00046                 MPI_Comm_size(MPI_COMM_WORLD, &_size);
00047         }
00051         static void barrier()
00052         {
00053                 MPI_Barrier(MPI_COMM_WORLD);
00054         }
00062         static void alltoall(void* _s, int _slen, void* _r, int _rlen)
00063         {
00064                 MPI_Alltoall(_s, _slen, MPI_CHAR, _r, _rlen, MPI_CHAR, MPI_COMM_WORLD);
00065         }
00075         static void alltoallv(void* _s, int* _slen, int* _soff, void* _r, int* _rlen, int* _roff)
00076         {
00077                 MPI_Alltoallv(_s, _slen, _soff, MPI_CHAR, _r, _rlen, _roff, MPI_CHAR, MPI_COMM_WORLD);
00078         }
00086         static void allgather(void* _s, int _slen, void* _r, int _rlen)
00087         {
00088                 MPI_Allgather(_s, _slen, MPI_CHAR, _r, _rlen, MPI_CHAR, MPI_COMM_WORLD);
00089         }
00098         static void allgatherv(void* _s, int _slen, void* _r, int* _rlen, int* _roff)
00099         {
00100                 MPI_Allgatherv(_s, _slen, MPI_CHAR, _r, _rlen, _roff, MPI_CHAR, MPI_COMM_WORLD);
00101         }
00102 
00103 };

Generated on Wed Apr 26 17:41:45 2006 for Parallel Toolbox by  doxygen 1.4.2