Construct fract(float) as a static inline call, instead of a new function.
Change-Id: I1356662cccc3d751e5dbe66353d4ce0956c9867c
diff --git a/scriptc/rs_cl.rsh b/scriptc/rs_cl.rsh
index 211f53b..1bcf1c9 100644
--- a/scriptc/rs_cl.rsh
+++ b/scriptc/rs_cl.rsh
@@ -450,14 +450,6 @@
/**
* Return fractional part of v
*
- * Supports float, float2, float3, float4.
- */
-_RS_RUNTIME float __attribute__((overloadable)) fract(float v);
-FN_FUNC_FN(fract)
-
-/**
- * Return fractional part of v
- *
* @param iptr iptr[0] will be set to the floor of the input value.
* Supports float, float2, float3, float4.
*/
@@ -465,6 +457,31 @@
FN_FUNC_FN_PFN(fract)
/**
+ * Return fractional part of v
+ *
+ * Supports float, float2, float3, float4.
+ */
+static inline float __attribute__((overloadable)) fract(float v) {
+ float unused;
+ return fract(v, &unused);
+}
+
+static inline float2 __attribute__((overloadable)) fract(float2 v) {
+ float2 unused;
+ return fract(v, &unused);
+}
+
+static inline float3 __attribute__((overloadable)) fract(float3 v) {
+ float3 unused;
+ return fract(v, &unused);
+}
+
+static inline float4 __attribute__((overloadable)) fract(float4 v) {
+ float4 unused;
+ return fract(v, &unused);
+}
+
+/**
* Return the mantissa and place the exponent into iptr[0]
*
* @param v Supports float, float2, float3, float4.