|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectat.dms.kjc.sir.statespace.LinearCost
public class LinearCost
This class represents the cost (variously defined) of computing
the value of a linear filter representation. I.e. it represents
the number of multiplies and adds that are necessary if we were to use
a direct implementation for one execution of a LinearFilterRepresentation.
Obviously, all of the multiplies and adds refer to floating point operations.int cols
Field Summary | |
---|---|
static LinearCost |
ZERO
LinearCost with 0 multiplies and 0 adds. |
Constructor Summary | |
---|---|
LinearCost(int muls,
int adds,
int rows,
int cols)
Note that muls and adds do NOT count multiplication/addition by zero or multiplication by one, whereas originalMatrixSize gives the number of elements (including zero and one) that were in the original matrix. |
Method Summary | |
---|---|
int |
getAdds()
|
long |
getDirectCost()
Returns the cost of this (in units proportional of estimated execution time, relative to any metric) if implemented directly in the time domain. |
int |
getMultiplies()
|
boolean |
lessThan(LinearCost other)
Returns true if this represents less computation than other. |
LinearCost |
plus(LinearCost other)
returns a new LinearCost that represents the sum (element wise) of this and other. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final LinearCost ZERO
Constructor Detail |
---|
public LinearCost(int muls, int adds, int rows, int cols)
Method Detail |
---|
public int getMultiplies()
public int getAdds()
public boolean lessThan(LinearCost other)
public LinearCost plus(LinearCost other)
public long getDirectCost()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |