summaryrefslogtreecommitdiff
path: root/sc/source
diff options
context:
space:
mode:
authorTor Lillqvist <tml@collabora.com>2016-10-06 16:03:16 +0300
committerTor Lillqvist <tml@collabora.com>2016-10-06 16:12:31 +0300
commit321a0625bd153dfb522d7f9574d698f632ab7262 (patch)
tree62e2767d2cb99d2f0af65e7893c74e6b4884d486 /sc/source
parentd999e48fda17c3525a0c3798d36e1a2102b6f297 (diff)
Undo bogus changes to OpenCL code in 3e22dfa5eb1ccebdc719a671d23bde7ccab256fb
Change-Id: Ieb6e6555f79c8030672a58a23248a2a5e7f8e09d
Diffstat (limited to 'sc/source')
-rw-r--r--sc/source/core/opencl/formulagroupcl.cxx16
-rw-r--r--sc/source/core/opencl/op_statistical.cxx12
2 files changed, 14 insertions, 14 deletions
diff --git a/sc/source/core/opencl/formulagroupcl.cxx b/sc/source/core/opencl/formulagroupcl.cxx
index 740e26ead786..7701c2cadcb2 100644
--- a/sc/source/core/opencl/formulagroupcl.cxx
+++ b/sc/source/core/opencl/formulagroupcl.cxx
@@ -36,9 +36,9 @@
static const char* publicFunc =
"\n"
- "#define FormulaError::IllegalFPOperation 503 // #NUM!\n"
- "#define FormulaError::NoValue 519 // #VALUE!\n"
- "#define FormulaError::DivisionByZero 532 // #DIV/0!\n"
+ "#define IllegalFPOperation 503 // #NUM!\n"
+ "#define NoValue 519 // #VALUE!\n"
+ "#define DivisionByZero 532 // #DIV/0!\n"
"#define NOTAVAILABLE 0x7fff // #N/A\n"
"\n"
"double CreateDoubleError(ulong nErr)\n"
@@ -51,9 +51,9 @@ static const char* publicFunc =
" if (isfinite(fVal))\n"
" return 0;\n"
" if (isinf(fVal))\n"
- " return FormulaError::IllegalFPOperation; // normal INF\n"
+ " return IllegalFPOperation; // normal INF\n"
" if (as_ulong(fVal) & 0XFFFF0000u)\n"
- " return FormulaError::NoValue; // just a normal NAN\n"
+ " return NoValue; // just a normal NAN\n"
" return (as_ulong(fVal) & 0XFFFF); // any other error\n"
"}\n"
"\n"
@@ -1762,7 +1762,7 @@ public:
if (isAverage())
ss <<
"if (nCount==0)\n"
- " return CreateDoubleError(FormulaError::DivisionByZero);\n";
+ " return CreateDoubleError(DivisionByZero);\n";
else if (isMinOrMax())
ss <<
"if (nCount==0)\n"
@@ -2156,7 +2156,7 @@ public:
virtual std::string GetBottom() override { return "1.0"; }
virtual std::string Gen2( const std::string& lhs, const std::string& rhs ) const override
{
- return "(" + rhs + "==0 ? CreateDoubleError(FormulaError::DivisionByZero) : (" + lhs + "/" + rhs + ") )";
+ return "(" + rhs + "==0 ? CreateDoubleError(DivisionByZero) : (" + lhs + "/" + rhs + ") )";
}
virtual std::string BinFuncName() const override { return "fdiv"; }
@@ -2166,7 +2166,7 @@ public:
{
ss <<
"if (isnan(" << vSubArguments[argno]->GenSlidingWindowDeclRef() << ")) {\n"
- " return CreateDoubleError(FormulaError::DivisionByZero);\n"
+ " return CreateDoubleError(DivisionByZero);\n"
"}\n";
return true;
}
diff --git a/sc/source/core/opencl/op_statistical.cxx b/sc/source/core/opencl/op_statistical.cxx
index 2668770b742b..c333e78f7590 100644
--- a/sc/source/core/opencl/op_statistical.cxx
+++ b/sc/source/core/opencl/op_statistical.cxx
@@ -194,7 +194,7 @@ void OpVar::GenSlidingWindowFunction(std::stringstream &ss,
}
}
ss << " if (fCount <= 1.0)\n";
- ss << " return CreateDoubleError(FormulaError::DivisionByZero);\n";
+ ss << " return CreateDoubleError(DivisionByZero);\n";
ss << " else\n";
ss << " return vSum * pow(fCount - 1.0,-1.0);\n";
ss << "}\n";
@@ -2657,7 +2657,7 @@ void OpSlope::GenSlidingWindowFunction(std::stringstream &ss,
ss << " }\n";
ss << " if (fCount < 1.0)\n";
- ss << " return CreateDoubleError(FormulaError::NoValue);\n";
+ ss << " return CreateDoubleError(NoValue);\n";
ss << " else\n";
ss << " {\n";
ss << " fMeanX = fSumX * pow(fCount,-1.0);\n";
@@ -2701,7 +2701,7 @@ void OpSlope::GenSlidingWindowFunction(std::stringstream &ss,
ss << " fSumSqrDeltaX += (argX-fMeanX) * (argX-fMeanX);\n";
ss << " }\n";
ss << " if(fSumSqrDeltaX == 0.0)\n";
- ss << " return CreateDoubleError(FormulaError::DivisionByZero);\n";
+ ss << " return CreateDoubleError(DivisionByZero);\n";
ss << " else\n";
ss << " {\n";
ss << " return fSumDeltaXDeltaY*pow(fSumSqrDeltaX,-1.0);\n";
@@ -3321,7 +3321,7 @@ void OpPearson::GenSlidingWindowFunction(
ss << " double tmp = ( fSumDeltaXDeltaY / ";
ss << "sqrt( fSumX * fSumY));\n\t";
ss << " if (isnan(tmp))\n";
- ss << " return CreateDoubleError(FormulaError::NoValue);\n";
+ ss << " return CreateDoubleError(NoValue);\n";
ss << " return tmp;\n";
ss << "}\n";
}
@@ -4738,7 +4738,7 @@ void OpNormsinv:: GenSlidingWindowFunction
ss << "z = q < 0.0 ? (-1)*z : z;\n";
ss <<"}\n";
ss <<"if (isnan(z))\n";
- ss <<" return CreateDoubleError(FormulaError::NoValue);\n";
+ ss <<" return CreateDoubleError(NoValue);\n";
ss <<"return z;\n";
ss <<"}\n";
}
@@ -7012,7 +7012,7 @@ void OpCovar::GenSlidingWindowFunction(std::stringstream& ss,
ss << " }\n";
}
ss << " if(cnt < 1) {\n";
- ss << " return CreateDoubleError(FormulaError::NoValue);\n";
+ ss << " return CreateDoubleError(NoValue);\n";
ss << " }\n";
ss << " else {\n";
ss << " vMean0 = vSum0 / cnt;\n";