public class FunctionCallSizeInfo extends Object
Constructor and Description |
---|
FunctionCallSizeInfo(FunctionCallGraph fgraph)
Constructs the function call summary for all functions
reachable from the main program.
|
FunctionCallSizeInfo(FunctionCallGraph fgraph,
boolean init)
Constructs the function call summary for all functions
reachable from the main program.
|
Modifier and Type | Method and Description |
---|---|
void |
addDimsPreservingFunction(String fkey)
Adds a function to the set of dimension-preserving
functions.
|
boolean |
equals(Object o) |
Set<String> |
getDimsPreservingFunctions()
Gets the set of dimension-preserving functions, i.e.,
functions with one matrix input and output of equal
dimension sizes.
|
int |
getFunctionCallCount(String fkey)
Gets the number of function calls to a given function.
|
Set<String> |
getInvalidFunctions()
Gets the set of functions that are invalid for statistics
propagation.
|
Set<String> |
getValidFunctions()
Gets the set of functions that are valid for statistics
propagation.
|
int |
hashCode() |
boolean |
hasSafeLiterals(String fkey)
Indicates if the given function has at least one input
that allows for safe literal propagation and replacement,
i.e., all function calls have consistent literal inputs.
|
boolean |
isDimsPreservingFunction(String fkey)
Indicates if the given function belongs to the set
of dimension-preserving functions.
|
boolean |
isSafeLiteral(String fkey,
int pos)
Indicates if the given function input allows for safe
literal propagation and replacement, i.e., all function calls
have consistent literal inputs.
|
boolean |
isSafeNnz(String fkey,
int pos)
Indicates if the given function input allows for safe
nnz propagation, i.e., all function calls have a consistent
number of non-zeros.
|
boolean |
isValidFunction(String fkey)
Indicates if the given function is valid for statistics
propagation.
|
String |
toString() |
public FunctionCallSizeInfo(FunctionCallGraph fgraph)
fgraph
- function call graphpublic FunctionCallSizeInfo(FunctionCallGraph fgraph, boolean init)
fgraph
- function call graphinit
- initialize function candidatespublic int getFunctionCallCount(String fkey)
fkey
- function keypublic boolean isValidFunction(String fkey)
fkey
- function keypublic Set<String> getValidFunctions()
public Set<String> getInvalidFunctions()
public void addDimsPreservingFunction(String fkey)
fkey
- function keypublic Set<String> getDimsPreservingFunctions()
public boolean isDimsPreservingFunction(String fkey)
fkey
- function keypublic boolean isSafeNnz(String fkey, int pos)
fkey
- function keypos
- function input positionpublic boolean hasSafeLiterals(String fkey)
fkey
- function keypublic boolean isSafeLiteral(String fkey, int pos)
fkey
- function keypos
- function input positionCopyright © 2020 The Apache Software Foundation. All rights reserved.