SST/macro
random_task_mapper.h
Go to the documentation of this file.
1 /*
2  * This file is part of SST/macroscale:
3  * The macroscale architecture simulator from the SST suite.
4  * Copyright (c) 2009 Sandia Corporation.
5  * This software is distributed under the BSD License.
6  * Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
7  * the U.S. Government retains certain rights in this software.
8  * For more information, see the LICENSE file in the top
9  * SST/macroscale directory.
10  */
11 
12 #ifndef SSTMAC_BACKENDS_NATIVE_LAUNCH_RANDOMINDEXING_H_INCLUDED
13 #define SSTMAC_BACKENDS_NATIVE_LAUNCH_RANDOMINDEXING_H_INCLUDED
14 
16 #include <sstmac/common/rng.h>
17 
18 namespace sstmac {
19 namespace sw {
20 
21 /**
22  * An index strategy that allocates indices using a round robin.
23  */
25 {
26 
27  public:
29  task_mapper(rt){}
30 
31  virtual void
32  init_factory_params(sprockit::sim_parameters *params);
33 
34  virtual
35  ~random_task_mapper() throw ();
36 
37  virtual void
38  map_ranks(
39  const app_id& aid,
40  const ordered_node_set& nodes,
41  int ppn,
42  std::vector<node_id> &result,
43  int nproc);
44 
45  protected:
47 
48 };
49 
50 }
51 } // end of namespace sstmac.
52 
53 #endif
54 
std::set< node_id > ordered_node_set
Definition: node_set.h:10
virtual void map_ranks(const app_id &aid, const ordered_node_set &nodes, int ppn, std::vector< node_id > &result, int nproc)
Assign processes to nodes.
This is a base class for random number generators that return an integer uniformly distributed in a r...
Definition: rng.h:26
SUMI = Simulator unified messagine interface It is also the name for a solid ink in Japanese - i...
virtual void init_factory_params(sprockit::sim_parameters *params)
Base class for strategies regarding how to sequentially number nodes in a parallel simulation...
Definition: task_mapper.h:33
random_task_mapper(parallel_runtime *rt)
int app_id
Definition: app_id.h:20
An index strategy that allocates indices using a round robin.