1/* 2 * Copyright (c) 1999-2008 Mark D. Hill and David A. Wood 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions are 7 * met: redistributions of source code must retain the above copyright 8 * notice, this list of conditions and the following disclaimer; --- 23 unchanged lines hidden (view full) --- 32// NetDest supports both node networks and component networks 33 34#ifndef __MEM_RUBY_COMMON_NETDEST_HH__ 35#define __MEM_RUBY_COMMON_NETDEST_HH__ 36 37#include <iostream> 38#include <vector> 39 |
40#include "mem/ruby/common/Set.hh" 41#include "mem/ruby/system/MachineID.hh" 42 43class NetDest 44{ 45 public: 46 // Constructors 47 // creates and empty set --- 55 unchanged lines hidden (view full) --- 103 int 104 vecIndex(MachineID m) const 105 { 106 int vec_index = MachineType_base_level(m.type); 107 assert(vec_index < m_bits.size()); 108 return vec_index; 109 } 110 |
111 NodeID bitIndex(NodeID index) const { return index; } |
112 113 std::vector<Set> m_bits; // a vector of bit vectors - i.e. Sets 114}; 115 116inline std::ostream& 117operator<<(std::ostream& out, const NetDest& obj) 118{ 119 obj.print(out); 120 out << std::flush; 121 return out; 122} 123 124#endif // __MEM_RUBY_COMMON_NETDEST_HH__ |