diff options
author | Stephen Hines <srhines@google.com> | 2016-01-31 00:22:52 +0000 |
---|---|---|
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2016-01-31 00:22:52 +0000 |
commit | a48442ad9cc9922d012407b3aebe648b5f0acf14 (patch) | |
tree | fb648d40199527b64d5b289469924cbbeb8ac902 /driver | |
parent | 0298e7a7a74c2455f8a6316e7a5cfea2b2442583 (diff) | |
parent | d1be4d815ed18d5cf538ff5f36f5d36304eb337f (diff) | |
download | rs-a48442ad9cc9922d012407b3aebe648b5f0acf14.tar.gz |
Merge "Move implementation of rsFrac from cpu_ref into driver/runtime."
Diffstat (limited to 'driver')
-rw-r--r-- | driver/runtime/rs_core.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/driver/runtime/rs_core.c b/driver/runtime/rs_core.c index bd0b2a1e..10e360e7 100644 --- a/driver/runtime/rs_core.c +++ b/driver/runtime/rs_core.c @@ -3,6 +3,11 @@ #include "rsCpuCoreRuntime.h" +extern float __attribute__((overloadable)) rsFrac(float v) { + int i = (int)floor(v); + return fmin(v - i, 0x1.fffffep-1f); +} + /* Function declarations from libRS */ extern float4 __attribute__((overloadable)) convert_float4(uchar4 c); |