|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectat.dms.util.Utils
at.dms.kjc.rstream.Util
public class Util
This class contains various function used by multiple passes
Field Summary | |
---|---|
static String |
CSTIFPVAR
|
static String |
CSTIINTVAR
|
static String |
CSTOFPVAR
|
static String |
CSTOINTVAR
|
Fields inherited from class at.dms.util.Utils |
---|
EMPTY_LIST, getForLoopCallers |
Constructor Summary | |
---|---|
Util()
|
Method Summary | |
---|---|
static boolean |
countMe(SIRFilter filter)
|
static CType |
getBaseType(CType type)
get the base type of a type, so for array's return the element type |
static int |
getItemsPushed(FlatNode from,
FlatNode to)
return the number of items pushed from *from* to *to* on each iteration of *from*. |
static int |
getTypeSize(CType type)
|
static JExpression |
getVar(JArrayAccessExpression expr)
get the variable access in an array access expression |
static boolean |
isIntOne(JExpression exp)
return true if this exp is a JIntLiteral and the int value is 1 |
static boolean |
isIntZero(JExpression exp)
return true if this exp is a JIntLiteral and the int value is 0 |
static String |
JPhylumToC(JPhylum top)
convert an IR tree to a string of C code |
static int[] |
makeInt(JExpression[] dims)
turn an array of JIntLiterals into an array of ints, fail if not JIntLiterals |
static String[] |
makeString(JExpression[] dims)
turn an array of expressions to any array of strings using FlatIRToRS |
static JExpression |
newIntAddExpr(JExpression left,
JExpression right)
construct a new JAddExpression, *left* + *right* where both are of type int. |
static JExpression |
newIntMultExpr(JExpression left,
JExpression right)
construct a new JMultExpression, *left* * *right* where both are of type int. |
static JExpression |
newIntSubExpr(JExpression left,
JExpression right)
construct a new JMinusExpression, *left* - *right* where both are of type int. |
static int |
nextPow2(int i)
|
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
Constructor Detail |
---|
public Util()
Method Detail |
---|
public static boolean countMe(SIRFilter filter)
public static int nextPow2(int i)
public static int getTypeSize(CType type)
public static CType getBaseType(CType type)
public static JExpression getVar(JArrayAccessExpression expr)
public static String[] makeString(JExpression[] dims)
public static int[] makeInt(JExpression[] dims)
public static int getItemsPushed(FlatNode from, FlatNode to)
public static String JPhylumToC(JPhylum top)
public static JExpression newIntAddExpr(JExpression left, JExpression right)
public static JExpression newIntMultExpr(JExpression left, JExpression right)
public static JExpression newIntSubExpr(JExpression left, JExpression right)
public static boolean isIntZero(JExpression exp)
public static boolean isIntOne(JExpression exp)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |