NetDest.hh (10004:5d8b72563869) | NetDest.hh (10086:bd1089db3a88) |
---|---|
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 | 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 "debug/RubyMemory.hh" 41#include "mem/protocol/MachineType.hh" 42#include "mem/ruby/common/Global.hh" | |
43#include "mem/ruby/common/Set.hh" 44#include "mem/ruby/system/MachineID.hh" 45 46class NetDest 47{ 48 public: 49 // Constructors 50 // creates and empty set --- 55 unchanged lines hidden (view full) --- 106 int 107 vecIndex(MachineID m) const 108 { 109 int vec_index = MachineType_base_level(m.type); 110 assert(vec_index < m_bits.size()); 111 return vec_index; 112 } 113 | 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 |
114 NodeID 115 bitIndex(NodeID index) const 116 { 117 return index; 118 } | 111 NodeID bitIndex(NodeID index) const { return index; } |
119 120 std::vector<Set> m_bits; // a vector of bit vectors - i.e. Sets 121}; 122 123inline std::ostream& 124operator<<(std::ostream& out, const NetDest& obj) 125{ 126 obj.print(out); 127 out << std::flush; 128 return out; 129} 130 131#endif // __MEM_RUBY_COMMON_NETDEST_HH__ | 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__ |
132 | |