SST/macro
hypercube.h
Go to the documentation of this file.
1 
2 /*
3  * This file is part of SST/macroscale:
4  * The macroscale architecture simulator from the SST suite.
5  * Copyright (c) 2009 Sandia Corporation.
6  * This software is distributed under the BSD License.
7  * Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
8  * the U.S. Government retains certain rights in this software.
9  * For more information, see the LICENSE file in the top
10  * SST/macroscale directory.
11  */
12 
13 
14 #ifndef SSTMAC_HARDWARE_NETWORK_TOPOLOGY_HYPERCUBE_H_INCLUDED
15 #define SSTMAC_HARDWARE_NETWORK_TOPOLOGY_HYPERCUBE_H_INCLUDED
16 
18 
19 namespace sstmac {
20 namespace hw {
21 
22 class hypercube :
23  public hdtorus
24 {
25  public:
26  virtual std::string
27  to_string() const {
28  return "hdtorus topology";
29  }
30 
31  virtual ~hypercube() {}
32 
33  virtual void
34  init_factory_params(sprockit::sim_parameters* params);
35 
36  virtual void
38  int dim,
39  const coordinates& src,
40  const coordinates& dst,
41  structured_routable::path& path) const;
42 
43  void
45  const coordinates &src_coords,
46  const coordinates &dest_coords,
47  structured_routable::path& path) const;
48 
49  virtual void
50  connect_objects(internal_connectable_map& switches);
51 
52  virtual int
53  convert_to_port(int dim, int dir) const;
54 
55  int
57  const coordinates& src_coords,
58  const coordinates& dest_coords) const;
59 
60  protected:
61  int radix_;
62  int ndim_;
63  std::vector<int> dim_to_outport_;
64 
65 };
66 
67 }
68 } //end of namespace sstmac
69 
70 #endif // HYPERCUBE_H
virtual void productive_path(int dim, const coordinates &src, const coordinates &dst, structured_routable::path &path) const
void minimal_route_to_coords(const coordinates &src_coords, const coordinates &dest_coords, structured_routable::path &path) const
Workhorse function for implementing minimal_route_to_switch and #minimal_route_to_node.
virtual int convert_to_port(int dim, int dir) const
virtual void connect_objects(internal_connectable_map &switches)
Given a set of connectables, connect them appropriately.
SUMI = Simulator unified messagine interface It is also the name for a solid ink in Japanese - i...
virtual std::string to_string() const
Definition: hypercube.h:27
virtual void init_factory_params(sprockit::sim_parameters *params)
virtual ~hypercube()
Definition: hypercube.h:31
Implements a high dimensional torus network.
Definition: hdtorus.h:29
std::vector< int > dim_to_outport_
Definition: hypercube.h:63
int minimal_distance(const coordinates &src_coords, const coordinates &dest_coords) const
The function accepts either source or node coordinates.