ruby: added broadcast mechanism
This commit is contained in:
@@ -31,6 +31,7 @@
|
||||
|
||||
// NodeID map_address_to_node(Address addr);
|
||||
MachineID mapAddressToRange(Address addr, MachineType type, int low, int high);
|
||||
NetDest broadcast(MachineType type);
|
||||
MachineID map_Address_to_DMA(Address addr);
|
||||
MachineID map_Address_to_Directory(Address addr);
|
||||
NodeID map_Address_to_DirectoryNode(Address addr);
|
||||
|
||||
@@ -85,6 +85,17 @@ MachineID map_Address_to_DMA(const Address & addr)
|
||||
return dma;
|
||||
}
|
||||
|
||||
inline
|
||||
NetDest broadcast(MachineType type)
|
||||
{
|
||||
NetDest dest;
|
||||
for (int i=0; i<MachineType_base_count(type); i++) {
|
||||
MachineID mach = {type, i};
|
||||
dest.add(mach);
|
||||
}
|
||||
return dest;
|
||||
}
|
||||
|
||||
inline
|
||||
MachineID mapAddressToRange(const Address & addr, MachineType type, int low_bit, int num_bits)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user