Implement fast native_exp*
Change-Id: I9b5b75e29fbe32c7b31775b03a53c4ecbc6bf4e2
diff --git a/scriptc/rs_cl.rsh b/scriptc/rs_cl.rsh
index 211f53b..6a84405 100644
--- a/scriptc/rs_cl.rsh
+++ b/scriptc/rs_cl.rsh
@@ -967,6 +967,45 @@
#endif // (defined(RS_VERSION) && (RS_VERSION >= 17))
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 18))
+// Fast native math functions.
+
+
+/**
+ * Fast approximate exp2
+ * valid for inputs -125.f to 125.f
+ * Max 8192 ulps of error
+ *
+ * Supports 1,2,3,4 components
+ */
+_RS_RUNTIME float __attribute__((overloadable)) native_exp2(float v);
+FN_FUNC_FN(native_exp2)
+
+/**
+ * Fast approximate exp
+ * valid for inputs -86.f to 86.f
+ * Max 8192 ulps of error
+ *
+ * Supports 1,2,3,4 components
+ */
+_RS_RUNTIME float __attribute__((overloadable)) native_exp(float v);
+FN_FUNC_FN(native_exp)
+
+/**
+ * Fast approximate exp10
+ * valid for inputs -37.f to 37.f
+ * Max 8192 ulps of error
+ *
+ * Supports 1,2,3,4 components
+ */
+_RS_RUNTIME float __attribute__((overloadable)) native_exp10(float v);
+FN_FUNC_FN(native_exp10)
+
+
+#endif // (defined(RS_VERSION) && (RS_VERSION >= 18))
+
+
#undef CVT_FUNC
#undef CVT_FUNC_2
#undef FN_FUNC_FN