public class FunctionReplacementUtils extends Object
Constructor and Description |
---|
FunctionReplacementUtils() |
Modifier and Type | Method and Description |
---|---|
static String |
getCastFunc(TypeProtos.MinorType targetMinorType)
Given the target type, get the appropriate cast function
|
static String |
getReplacingFunction(String functionName,
TypeProtos.DataMode dataMode,
TypeProtos.MinorType inputType)
Get a replacing function for the original function, based on the specified data mode
|
static boolean |
isCastFunction(String functionName)
Check if a function is a cast function.
|
static boolean |
isReplacementNeeded(String functionName,
TypeProtos.MinorType inputType)
Check if a replacing function is available for the the original function
|
public static String getCastFunc(TypeProtos.MinorType targetMinorType)
targetMinorType
- the target data typepublic static String getReplacingFunction(String functionName, TypeProtos.DataMode dataMode, TypeProtos.MinorType inputType)
functionName
- original function namedataMode
- data mode of the input datainputType
- input (minor) typepublic static boolean isReplacementNeeded(String functionName, TypeProtos.MinorType inputType)
functionName
- original function nameinputType
- input (minor) typetrue
if replacement is needed, false
otherwisepublic static boolean isCastFunction(String functionName)
functionName
- name of the functiontrue
if function is CAST function, false
otherwiseCopyright © 1970 The Apache Software Foundation. All rights reserved.