ESyS-Particle  2.3
BroadCast_cmd.h
Go to the documentation of this file.
1 // //
3 // Copyright (c) 2003-2014 by The University of Queensland //
4 // Centre for Geoscience Computing //
5 // http://earth.uq.edu.au/centre-geoscience-computing //
6 // //
7 // Primary Business: Brisbane, Queensland, Australia //
8 // Licensed under the Open Software License version 3.0 //
9 // http://www.opensource.org/licenses/osl-3.0.php //
10 // //
12 
13 #ifndef __BROADCAST_CMD_H
14 #define __BROADCAST_CMD_H
15 
16 #include "Parallel/mpicmdbuf.h"
17 #include "Parallel/mpivbuf.h"
18 #include "Parallel/mpibarrier.h"
19 #include "Parallel/RankAndComm.h"
20 
25 {
26  private:
31 
32  public:
33  BroadcastCommand(const MpiRankAndComm &rankAndComm, int cmdId);
34  virtual ~BroadcastCommand(){}
35 
40  template <typename TmplData>
41  void appendTypeAndName(const TmplData &namedWithType);
42 
46  template <typename TmplData>
47  void append(const TmplData &basicTypeData);
48 
52  template <typename TmplPackable>
53  void packInto(const TmplPackable&);
54 
58  const int& getCommandId() const;
59 
63  void broadcastCommand();
64 
68  void broadcastBuffer();
69 
73  void wait(const std::string &barrierName);
74 
79  void broadcast();
80 
81 };
83 
84 #endif // BROADCAST_CMD_H
const int & getCommandId() const
Definition: BroadCast_cmd.cpp:23
Class for sending commands from the LatticeMaster to the SubLatticeControler.
Definition: mpicmdbuf.h:29
BroadcastCommand(const MpiRankAndComm &rankAndComm, int cmdId)
Definition: BroadCast_cmd.cpp:15
A convenience class encapsulating an MPI barrier. Includes timing of the wait and a debug message ( v...
Definition: mpibarrier.h:30
CVarMPIBuffer m_varBuffer
Definition: BroadCast_cmd.h:28
Definition: RankAndComm.h:19
CMPILCmdBuffer m_cmdBuffer
Definition: BroadCast_cmd.h:30
base class for broadcast commands
Definition: BroadCast_cmd.h:24
void appendTypeAndName(const TmplData &namedWithType)
Definition: BroadCast_cmd.hpp:20
CMPIBarrier m_barrier
Definition: BroadCast_cmd.h:29
void packInto(const TmplPackable &)
Definition: BroadCast_cmd.hpp:14
void append(const TmplData &basicTypeData)
Definition: BroadCast_cmd.hpp:27
MPI send/recv buffer with automagically adjusted size.
Definition: mpivbuf.h:34
int m_commandId
Definition: BroadCast_cmd.h:27
void wait(const std::string &barrierName)
Definition: BroadCast_cmd.cpp:38
void broadcast()
Definition: BroadCast_cmd.cpp:43
void broadcastBuffer()
Definition: BroadCast_cmd.cpp:33
virtual ~BroadcastCommand()
Definition: BroadCast_cmd.h:34
void broadcastCommand()
Definition: BroadCast_cmd.cpp:28