|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectat.dms.kjc.sir.linear.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,
int popCount)
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. |
double |
getFrequencyComputationCost()
Gives an estimate of the cost of the actual FFT operation. This is based on a regression of execution time for a program in frequency and in time for varying sizes (taps) of FIR's. |
long |
getFrequencyCost()
Returns the cost of this (in terms of estimated execution time, relative to any metric) if implemented in the frequency domain. Must be comparable to values returned by getDirectCost(). |
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, int popCount)
Method Detail |
---|
public int getMultiplies()
public int getAdds()
public boolean lessThan(LinearCost other)
public LinearCost plus(LinearCost other)
public long getDirectCost()
public long getFrequencyCost()
public double getFrequencyComputationCost()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |