Class Builtin
java.lang.Object
org.apache.sysds.runtime.functionobjects.FunctionObject
org.apache.sysds.runtime.functionobjects.ValueFunction
org.apache.sysds.runtime.functionobjects.Builtin
- All Implemented Interfaces:
Serializable
Class with pre-defined set of objects. This class can not be instantiated elsewhere.
Notes on commons.math FastMath:
* FastMath uses lookup tables and interpolation instead of native calls.
* The memory overhead for those tables is roughly 48KB in total (acceptable)
* Micro and application benchmarks showed significantly (30%-3x) performance improvements
for most operations; without loss of accuracy.
* atan / sqrt were 20% slower in FastMath and hence, we use Math there
* round / abs were equivalent in FastMath and hence, we use Math there
* Finally, there is just one argument against FastMath - The comparison heavily depends
on the JVM. For example, currently the IBM JDK JIT compiles to HW instructions for sqrt
which makes this operation very efficient; as soon as other operations like log/exp are
similarly compiled, we should rerun the micro benchmarks, and switch back if necessary.
- See Also:
-
Nested Class Summary
Nested Classes -
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptiondoubleexecute(double in) longexecute(double[] a, double[] c, int start, int end) doubleexecute(double in1, double in2) doubleexecute(long in) doubleexecute(long in1, long in2) static BuiltingetBuiltinFnObject(String str) static Builtinbooleanstatic booleanisBuiltinCode(ValueFunction fn, Builtin.BuiltinCode... codes) static booleanisBuiltinFnObject(String str) toString()Methods inherited from class org.apache.sysds.runtime.functionobjects.ValueFunction
isBinary, requiresCorrection
-
Field Details
-
bFunc
-
String2BuiltinCode
-
-
Method Details
-
getBuiltinCode
-
isBuiltinCode
-
isBuiltinFnObject
-
getBuiltinFnObject
-
getBuiltinFnObject
-
execute
public double execute(double in) - Overrides:
executein classFunctionObject
-
execute
public long execute(double[] a, double[] c, int start, int end) -
execute
public double execute(long in) - Overrides:
executein classFunctionObject
-
execute
public double execute(double in1, double in2) - Overrides:
executein classFunctionObject
-
execute
public double execute(long in1, long in2) - Overrides:
executein classFunctionObject
-
execute
- Overrides:
executein classFunctionObject
-
isBinarySparseSafe
public boolean isBinarySparseSafe() -
toString
- Overrides:
toStringin classValueFunction
-