at.dms.kjc.cell
Class CellChip

java.lang.Object
  extended by at.dms.kjc.cell.CellChip
All Implemented Interfaces:
ComputeNodesI<CellComputeCodeStore>

public class CellChip
extends Object
implements ComputeNodesI<CellComputeCodeStore>


Constructor Summary
CellChip(Integer numberOfSpus)
          Construct a new collection and fill it with ComputeNodes.
 
Method Summary
 boolean canAllocateNewComputeNode()
          Does this implementation have dynamic creation of new nodes or are all nodes statically allocated.
 CellPU getNthComputeNode(int n)
          Get the nth element of the collection of compute nodes.
 PPU getPPU()
           
 LinkedList<SPU> getSPUs()
           
 boolean isValidComputeNodeNumber(int cellpuNumber)
          Does a number correspond to a compute node?
 int newComputeNode()
          Create a new compute node if compute nodes are dynamically creatable.
 int numberOfSPUs()
           
 int size()
          Return the (current) number of compute nodes.
 CellPU[] toArray()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CellChip

public CellChip(Integer numberOfSpus)
Construct a new collection and fill it with ComputeNodes.

Parameters:
numberOfNodes -
Method Detail

canAllocateNewComputeNode

public boolean canAllocateNewComputeNode()
Description copied from interface: ComputeNodesI
Does this implementation have dynamic creation of new nodes or are all nodes statically allocated.

Specified by:
canAllocateNewComputeNode in interface ComputeNodesI<CellComputeCodeStore>
Returns:
if false, ComputeNodesI.newComputeNode() may throw any throwable.

getNthComputeNode

public CellPU getNthComputeNode(int n)
Description copied from interface: ComputeNodesI
Get the nth element of the collection of compute nodes.

Specified by:
getNthComputeNode in interface ComputeNodesI<CellComputeCodeStore>

getPPU

public PPU getPPU()

getSPUs

public LinkedList<SPU> getSPUs()

isValidComputeNodeNumber

public boolean isValidComputeNodeNumber(int cellpuNumber)
Description copied from interface: ComputeNodesI
Does a number correspond to a compute node?

Specified by:
isValidComputeNodeNumber in interface ComputeNodesI<CellComputeCodeStore>
Parameters:
cellpuNumber - number to check
Returns:
true if a valid compute node number, false otherwise.

newComputeNode

public int newComputeNode()
Description copied from interface: ComputeNodesI
Create a new compute node if compute nodes are dynamically creatable.

Specified by:
newComputeNode in interface ComputeNodesI<CellComputeCodeStore>
Returns:
unique number for the new compute node, usable with #getComputeNode(int).

size

public int size()
Description copied from interface: ComputeNodesI
Return the (current) number of compute nodes.

Specified by:
size in interface ComputeNodesI<CellComputeCodeStore>
Returns:
size of collection of compute nodes.

numberOfSPUs

public int numberOfSPUs()

toArray

public CellPU[] toArray()