SST/macro
index_subset.h
Go to the documentation of this file.
1 #ifndef INDEX_SUBSET_H
2 #define INDEX_SUBSET_H
3 
4 #include <vector>
5 
6 namespace sstmac {
7 namespace hw {
8 
9 class index_subset {
10  public:
11  typedef std::vector<int>::iterator iterator;
12 
13  public:
14  std::string
15  to_string() const {
16  return "index_subset";
17  }
18 
19  iterator
20  begin() {
21  return subset_.begin();
22  }
23 
24  iterator
25  end() {
26  return subset_.end();
27  }
28 
29  void
30  push_back(int idx) {
31  subset_.push_back(idx);
32  }
33 
34  void
35  clear() {
36  subset_.clear();
37  }
38 
39  size_t
40  size() const {
41  return subset_.size();
42  }
43 
44  std::vector<int>&
45  data() {
46  return subset_;
47  }
48 
49  private:
50  std::vector<int> subset_;
51 };
52 
53 }
54 }
55 
56 #endif // INDEX_SUBSET_H
57 
std::vector< int > subset_
Definition: index_subset.h:50
std::vector< int >::iterator iterator
Definition: index_subset.h:11
SUMI = Simulator unified messagine interface It is also the name for a solid ink in Japanese - i...
size_t size() const
Definition: index_subset.h:40
std::string to_string() const
Definition: index_subset.h:15
void push_back(int idx)
Definition: index_subset.h:30
std::vector< int > & data()
Definition: index_subset.h:45