SST/macro
serial_runtime.h
Go to the documentation of this file.
1 #ifndef SERIAL_RUNTIME_H
2 #define SERIAL_RUNTIME_H
3 
5 
6 namespace sstmac {
7 namespace native {
8 
10  public parallel_runtime
11 {
12  public:
14 
15  std::string
16  to_string() const {
17  return "serial runtime";
18  }
19 
20  virtual int64_t
21  allreduce_min(int64_t mintime);
22 
23  virtual int64_t
24  allreduce_max(int64_t maxtime);
25 
26  virtual void
27  global_sum(long *data, int nelems, int root);
28 
29  virtual void
30  global_sum(long long *data, int nelems, int root);
31 
32  virtual void
33  global_max(int *data, int nelems, int root);
34 
35  virtual void
36  global_max(long *data, int nelems, int root);
37 
38  virtual void
39  gather(void *send_buffer, int num_bytes, void *recv_buffer, int root);
40 
41  virtual void
42  allgather(void *send_buffer, int num_bytes, void *recv_buffer);
43 
44  virtual void
45  send(int dst, void *buffer, int buffer_size);
46 
47  virtual void
48  recv(int src, void *buffer, int buffer_size);
49 
50  virtual void
51  bcast(void* buffer, int bytes, int root);
52 
53  void finalize(){}
54 
55  /**
56  @param pool A buffer cache corresponding to a pool of free buffers
57  @param incoming A buffer cache holding buffers that correspond to incoming messages
58  */
59  void
60  send_recv_messages(std::vector<incoming_msg>& incoming);
61 
62  /**
63  * @param The topology id to send a remote message to
64  * @param buffer The buffer containing a serialized message
65  * @param size The size of the buffer being sent
66  */
67  void
69 
70  virtual void
71  wait_merge_array(int tag);
72 
73  virtual void
74  declare_merge_array(void* buffer, int size, int tag);
75 
76  virtual bool
77  release_merge_array(int tag);
78 
79  protected:
80  virtual void
81  do_send_message(int lp, void* buffer, int size);
82 
83  virtual void
84  do_send_recv_messages(std::vector<void*>& buffers);
85 
86  std::map<int, int> merge_refcounts_;
87 
88 };
89 
91 
92 
93 }
94 }
95 
96 
97 
98 #endif // SERIAL_RUNTIME_H
virtual void global_max(int *data, int nelems, int root)
virtual void do_send_recv_messages(std::vector< void * > &buffers)
virtual void allgather(void *send_buffer, int num_bytes, void *recv_buffer)
int32_t topology_id
Definition: node_address.h:22
DeclareFactory(parallel_runtime)
virtual void bcast(void *buffer, int bytes, int root)
virtual int64_t allreduce_max(int64_t maxtime)
virtual bool release_merge_array(int tag)
std::map< int, int > merge_refcounts_
virtual void gather(void *send_buffer, int num_bytes, void *recv_buffer, int root)
void send_event(timestamp t, topology_id tid, event *ev)
virtual void declare_merge_array(void *buffer, int size, int tag)
A basic container for time (subject to future transplant).
Definition: timestamp.h:29
SUMI = Simulator unified messagine interface It is also the name for a solid ink in Japanese - i...
virtual int64_t allreduce_min(int64_t mintime)
virtual void recv(int src, void *buffer, int buffer_size)
virtual void do_send_message(int lp, void *buffer, int size)
void send_recv_messages(std::vector< incoming_msg > &incoming)
virtual void send(int dst, void *buffer, int buffer_size)
virtual void wait_merge_array(int tag)
std::string to_string() const
virtual void global_sum(long *data, int nelems, int root)