SST/macro
flattened_butterfly.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 // flattenedbutterfly.h: Interface for torus networks.
13 //
14 // Author: Jeremiah Wilke <jjwilke@sandia.gov>
15 
16 #ifndef SSTMAC_HARDWARE_NETWORK_TOPOLOGY_flattenedbutterfly_H_INCLUDED
17 #define SSTMAC_HARDWARE_NETWORK_TOPOLOGY_flattenedbutterfly_H_INCLUDED
18 
21 
22 namespace sstmac {
23 namespace hw {
24 
25 /**
26  * @brief The flattened_butterfly class
27  * Encapsulates a flattened butterfly topology as described in
28  * "High Performance Datacenter Networks" by Abts and Kim
29  */
31  public abstract_butterfly
32 {
33 
34  public:
35  virtual std::string
36  to_string() const {
37  return "flattened butterfly topology";
38  }
39 
40  virtual ~flattened_butterfly() {}
41 
42  void
43  init_factory_params(sprockit::sim_parameters *params);
44 
45  int
46  num_switches() const {
47  return nswitches_per_col_;
48  }
49 
50  int
51  ndimensions() const {
52  return nfly_ - 1;
53  }
54 
55  void
57  const coordinates &src_coords,
58  const coordinates &dest_coords,
59  structured_routable::path& path) const;
60 
61  int
62  minimal_distance(const coordinates &src_coords,
63  const coordinates &dest_coords) const;
64 
65  virtual void
66  connect_objects(internal_connectable_map& switches);
67 
68  virtual int
69  convert_to_port(int dim, int dir) const;
70 
71  switch_id
72  switch_number(const coordinates &coords) const;
73 
74  virtual void
76  int dim,
77  const coordinates& src,
78  const coordinates& dst,
79  structured_routable::path& path) const;
80 
81  protected:
82  virtual void
83  compute_switch_coords(switch_id uid, coordinates& coords) const;
84 
85 };
86 
87 }
88 } //end of namespace sstmac
89 
90 #endif
The abstract_butterfly class Encapsulates operations common to both butterfly and flattened_butterfly...
Definition: butterfly.h:28
int minimal_distance(const coordinates &src_coords, const coordinates &dest_coords) const
The function accepts either source or node coordinates.
The flattened_butterfly class Encapsulates a flattened butterfly topology as described in "High Perfo...
virtual void productive_path(int dim, const coordinates &src, const coordinates &dst, structured_routable::path &path) const
virtual void connect_objects(internal_connectable_map &switches)
Given a set of connectables, connect them appropriately.
topology_id switch_id
Definition: node_address.h:23
virtual std::string to_string() const
SUMI = Simulator unified messagine interface It is also the name for a solid ink in Japanese - i...
void init_factory_params(sprockit::sim_parameters *params)
virtual void compute_switch_coords(switch_id uid, coordinates &coords) const
Compute coordinates (e.g.
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.
switch_id switch_number(const coordinates &coords) const
int ndimensions() const
The number of distinct &#39;dimensions&#39; in the topology.
virtual int convert_to_port(int dim, int dir) const