diff options
author | yangzhang <yangzhang@multicorewareinc.com> | 2013-12-05 09:30:35 +0800 |
---|---|---|
committer | I-Jui (Ray) Sung <ray@multicorewareinc.com> | 2013-12-18 20:34:57 -0600 |
commit | 821e19f227dba1fd2fbe63475e30559f06db4652 (patch) | |
tree | e41831e9855d9b885c5597b36d3fcdd0feff219a /sc | |
parent | de0013f64ad18f93dc175bdf3843aec1cfa102cb (diff) |
GPU Calc: Optimized ATANH
AMLOEXT-273
Signed-off-by: haochen <haochen@multicorewareinc.com>
Signed-off-by: Wei Wei <weiwei@multicorewareinc.com>
Signed-off-by: I-Jui (Ray) Sung <ray@multicorewareinc.com>
Diffstat (limited to 'sc')
-rw-r--r-- | sc/source/core/opencl/op_math.cxx | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/sc/source/core/opencl/op_math.cxx b/sc/source/core/opencl/op_math.cxx index e96c7caad71a..3ae28bc20f7e 100644 --- a/sc/source/core/opencl/op_math.cxx +++ b/sc/source/core/opencl/op_math.cxx @@ -1273,7 +1273,9 @@ void OpArcTanH::GenSlidingWindowFunction(std::stringstream &ss, ss << " else \n "; #endif ss << " tmp = " << vSubArguments[0]->GenSlidingWindowDeclRef() << ";\n"; - ss << " return atanh(tmp);\n"; + ss << " double a = 1.0 + tmp;\n"; + ss << " double b = 1.0 - tmp;\n"; + ss << " return log(pow(a/b, 0.5));\n"; ss << "}"; } void OpBitAnd::GenSlidingWindowFunction(std::stringstream &ss, |