Kaydet (Commit) 3eb75fa4 authored tarafından yangzhang's avatar yangzhang Kaydeden (comit) I-Jui (Ray) Sung

GPU Calc: Optimized ASIN

AMLOEXT-269

Change-Id: I10d33b50f743630ed91daa743017e431754e5659
Signed-off-by: 's avatarhaochen <haochen@multicorewareinc.com>
Signed-off-by: 's avatarWei Wei <weiwei@multicorewareinc.com>
Signed-off-by: 's avatarI-Jui (Ray) Sung <ray@multicorewareinc.com>
üst f4874935
......@@ -1325,6 +1325,12 @@ void OpArcCotHyp::GenSlidingWindowFunction(std::stringstream &ss,
ss << " return 0.5 * log(1 + 2 * pown(arg0 - 1.0, -1));\n";
ss << "}";
}
void OpArcSin::BinInlineFun(std::set<std::string>& decls,
std::set<std::string>& funs)
{
decls.insert(atan2Decl);
funs.insert(atan2Content);
}
void OpArcSin::GenSlidingWindowFunction(std::stringstream &ss,
const std::string sSymName, SubArguments &vSubArguments)
{
......@@ -1349,7 +1355,7 @@ void OpArcSin::GenSlidingWindowFunction(std::stringstream &ss,
ss << " else \n ";
#endif
ss << " tmp = " << vSubArguments[0]->GenSlidingWindowDeclRef() << ";\n";
ss << " return asin(tmp);\n";
ss << " return arctan2(tmp, sqrt(1.0 - pow(tmp, 2)));\n";
ss << "}";
}
void OpArcSinHyp::GenSlidingWindowFunction(std::stringstream &ss,
......
......@@ -153,6 +153,7 @@ public:
const std::string sSymName, SubArguments &vSubArguments);
virtual std::string GetBottom(void) { return "0.0"; }
virtual std::string BinFuncName(void) const { return "ScASin"; }
virtual void BinInlineFun(std::set<std::string>& ,std::set<std::string>&);
};
class OpArcSinHyp:public Normal{
public:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment