diff options
author | Stephen Hines <srhines@google.com> | 2013-08-14 16:46:21 -0700 |
---|---|---|
committer | Stephen Hines <srhines@google.com> | 2013-08-14 16:49:26 -0700 |
commit | 11418c87254f0cbffa910fe8f105b7da92452487 (patch) | |
tree | a5cd3b3122a29d03ebbae761421216e8520f7986 /cpu_ref/rsCpuRuntimeMath.cpp | |
parent | 3870c6666e2e7d372daa6e0610f0f83695c954ec (diff) | |
download | rs-11418c87254f0cbffa910fe8f105b7da92452487.tar.gz |
Provide a tgammaf() wrapper for compatibility on Gingerbread.
Bug: 10315692
GB devices don't have tgammaf(float) and only have tgamma(double). We
provide a simple wrapper to convert between the two for the compatibility
library.
Change-Id: Id8566450405482e876148d62ffbe46fa62049049
Diffstat (limited to 'cpu_ref/rsCpuRuntimeMath.cpp')
-rw-r--r-- | cpu_ref/rsCpuRuntimeMath.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/cpu_ref/rsCpuRuntimeMath.cpp b/cpu_ref/rsCpuRuntimeMath.cpp index 04a80e08..c80111ab 100644 --- a/cpu_ref/rsCpuRuntimeMath.cpp +++ b/cpu_ref/rsCpuRuntimeMath.cpp @@ -46,7 +46,11 @@ using namespace android::renderscript; // Handle missing Gingerbread functions like tgammaf. float SC_tgammaf(float x) { +#ifdef RS_COMPATIBILITY_LIB return tgamma(x); +#else + return tgammaf(x); +#endif } uint32_t SC_abs_i32(int32_t v) {return abs(v);} @@ -225,7 +229,7 @@ static RsdCpuReference::CpuSymbol gSyms[] = { { "_Z4sqrtf", (void *)&sqrtf, true }, { "_Z3tanf", (void *)&tanf, true }, { "_Z4tanhf", (void *)&tanhf, true }, - { "_Z6tgammaf", (void *)&tgammaf, true }, + { "_Z6tgammaf", (void *)&SC_tgammaf, true }, { "_Z5truncf", (void *)&truncf, true }, //{ "smoothstep", (void *)&, true }, |