|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectat.dms.kjc.spacetime.Util
public class Util
A class with useful functions that span classes.
Field Summary | |
---|---|
static String |
CGNIFPVAR
|
static String |
CGNIINTVAR
|
static String |
CGNOFPVAR
|
static String |
CGNOINTVAR
|
static String |
CSTIFPVAR
|
static String |
CSTIINTVAR
|
static String |
CSTOFPVAR
|
static String |
CSTOINTVAR
|
Constructor Summary | |
---|---|
Util()
|
Method Summary | ||
---|---|---|
static void |
add(LinkedList<Integer> list,
int[] addme)
Add the elements of addme to list. |
|
static void |
add(LinkedList list,
Object[] addme)
Add the elements of addme to list. |
|
static void |
addAll(HashSet set,
Collection c)
|
|
static int |
cacheLineDiv(int i)
|
|
static boolean |
doesSliceUseTile(Slice slice,
ComputeNode tile,
Layout layout)
|
|
static CType |
getBaseType(CType type)
|
|
static String |
getFileHandle(PredefinedContent content)
|
|
static String |
getFileVar(PredefinedContent content)
|
|
static String |
getOutputsVar(FileOutputContent out)
|
|
static int |
getTypeSize(CType type)
For type return the number of words that it occupies. |
|
static int |
initBufferSize(InterSliceEdge edge)
|
|
static int |
magicBufferSize(InterSliceEdge edge)
|
|
static int[] |
makeInt(JExpression[] dims)
|
|
static String[] |
makeString(JExpression[] dims)
|
|
static double |
mean(int[] array)
|
|
static int |
median(int[] array)
|
|
static String |
networkReceive(boolean dynamic,
CType tapeType)
|
|
static String |
networkSendPrefix(boolean dynamic,
CType tapeType)
|
|
static String |
networkSendSuffix(boolean dynamic)
|
|
static boolean |
onlyFileInput(InputSliceNode node)
Determine if this input slice node reads from a single source and the source is a file device. |
|
static boolean |
onlyWritingToAFile(OutputSliceNode outNode)
|
|
static int |
outputsPerSteady(SIRStream str,
HashMap exeCounts)
Calculate the number of items the file writers write to files in the schedule exeCounts. |
|
static void |
printExecutionCount(HashMap map)
Print to screen the mapping of multiplicities |
|
static void |
sendConstFromTileToSwitch(RawTile tile,
int c,
boolean init,
boolean primePump,
SwitchReg reg)
|
|
static
|
setCompare(LinkedList<T> list,
T[] array)
Return true if the sets contructed from list and array are equal. |
|
static SliceNode[] |
sliceNodeArray(Slice[] traces)
|
|
static LinkedList<FilterSliceNode> |
sortedFilterSlicesTime(Partitioner partitioner)
Return a sorted list of filter trace nodes for time only that does not include io traces. |
|
static int |
steadyBufferSize(InterSliceEdge edge)
|
|
static int |
sum(int[] array)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static String CSTOINTVAR
public static String CSTOFPVAR
public static String CSTIFPVAR
public static String CSTIINTVAR
public static String CGNOINTVAR
public static String CGNOFPVAR
public static String CGNIFPVAR
public static String CGNIINTVAR
Constructor Detail |
---|
public Util()
Method Detail |
---|
public static void printExecutionCount(HashMap map)
map
- The HashMap.public static int getTypeSize(CType type)
type
- The type.
public static int[] makeInt(JExpression[] dims)
public static CType getBaseType(CType type)
public static String[] makeString(JExpression[] dims)
public static <T> boolean setCompare(LinkedList<T> list, T[] array)
T
- Type of list elements and array elements.list
- The listarray
- The array
public static void add(LinkedList<Integer> list, int[] addme)
list
- The list.addme
- Add elements to list.public static void add(LinkedList list, Object[] addme)
list
- The list.addme
- Add elements to list.public static String networkReceive(boolean dynamic, CType tapeType)
dynamic
- tapeType
-
public static boolean doesSliceUseTile(Slice slice, ComputeNode tile, Layout layout)
slice
- tile
-
tracehas a filter that is mapped to
tile.
public static int median(int[] array)
array
-
array.
public static double mean(int[] array)
array
-
array.
public static int sum(int[] array)
array
-
public static String networkSendPrefix(boolean dynamic, CType tapeType)
dynamic
- tapeType
-
public static String networkSendSuffix(boolean dynamic)
dynamic
-
public static int steadyBufferSize(InterSliceEdge edge)
public static int initBufferSize(InterSliceEdge edge)
public static int magicBufferSize(InterSliceEdge edge)
public static String getFileVar(PredefinedContent content)
public static String getFileHandle(PredefinedContent content)
public static String getOutputsVar(FileOutputContent out)
public static int cacheLineDiv(int i)
public static void addAll(HashSet set, Collection c)
public static SliceNode[] sliceNodeArray(Slice[] traces)
traces
-
tracesarray dictated by the order that the traces appear in
traces.
public static void sendConstFromTileToSwitch(RawTile tile, int c, boolean init, boolean primePump, SwitchReg reg)
public static LinkedList<FilterSliceNode> sortedFilterSlicesTime(Partitioner partitioner)
partitioner
-
public static int outputsPerSteady(SIRStream str, HashMap exeCounts)
str
- The toplevel container.exeCounts
- The schedule.
public static boolean onlyFileInput(InputSliceNode node)
node
- The InputSliceNode to check
public static boolean onlyWritingToAFile(OutputSliceNode outNode)
outNode
- OutputSliceNode
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |