From 3d0152ba5f551e23b3de5a32e0c45e9d73f482ed Mon Sep 17 00:00:00 2001 From: Wei Wei Date: Wed, 18 Dec 2013 16:34:56 -0600 Subject: GPU Calc: remove the warning; shrink the test case number for XOR and NOT Change-Id: Ib184aa27a4bd4553886fb9422c937dac9c053a4e Signed-off-by: I-Jui (Ray) Sung --- sc/qa/unit/data/xls/opencl/logical/not.xls | Bin 2204160 -> 776704 bytes sc/qa/unit/data/xls/opencl/logical/xor.xls | Bin 3285504 -> 972800 bytes sc/qa/unit/opencl-test.cxx | 4 ++-- sc/source/core/opencl/op_statistical.cxx | 12 ++++++------ 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/sc/qa/unit/data/xls/opencl/logical/not.xls b/sc/qa/unit/data/xls/opencl/logical/not.xls index 651a8f9cd808..7cd86a0677d2 100644 Binary files a/sc/qa/unit/data/xls/opencl/logical/not.xls and b/sc/qa/unit/data/xls/opencl/logical/not.xls differ diff --git a/sc/qa/unit/data/xls/opencl/logical/xor.xls b/sc/qa/unit/data/xls/opencl/logical/xor.xls index fccba9b19f1d..7737727ae5ed 100644 Binary files a/sc/qa/unit/data/xls/opencl/logical/xor.xls and b/sc/qa/unit/data/xls/opencl/logical/xor.xls differ diff --git a/sc/qa/unit/opencl-test.cxx b/sc/qa/unit/opencl-test.cxx index 9d283597141c..09c8a489c1f0 100644 --- a/sc/qa/unit/opencl-test.cxx +++ b/sc/qa/unit/opencl-test.cxx @@ -4942,7 +4942,7 @@ void ScOpenclTest:: testLogicalFormulaNot() ScDocShellRef xDocShRes = loadDoc("opencl/logical/not.", XLS); ScDocument *pDocRes = xDocShRes->GetDocument(); CPPUNIT_ASSERT(pDocRes); - for (SCROW i = 0; i < 30000; ++i) + for (SCROW i = 0; i < 3000; ++i) { double fLibre = pDoc->GetValue(ScAddress(1, i, 0)); double fExcel = pDocRes->GetValue(ScAddress(1, i, 0)); @@ -4964,7 +4964,7 @@ void ScOpenclTest:: testLogicalFormulaXor() ScDocShellRef xDocShRes = loadDoc("opencl/logical/xor.", XLS); ScDocument *pDocRes = xDocShRes->GetDocument(); CPPUNIT_ASSERT(pDocRes); - for (SCROW i = 0; i < 30000; ++i) + for (SCROW i = 0; i < 3000; ++i) { double fLibre = pDoc->GetValue(ScAddress(1, i, 0)); double fExcel = pDocRes->GetValue(ScAddress(1, i, 0)); diff --git a/sc/source/core/opencl/op_statistical.cxx b/sc/source/core/opencl/op_statistical.cxx index 47c5ccf729fb..c3b8a5de2ef3 100644 --- a/sc/source/core/opencl/op_statistical.cxx +++ b/sc/source/core/opencl/op_statistical.cxx @@ -3798,7 +3798,7 @@ void OpPearson::GenSlidingWindowFunction( ss <<"\n"; for (i = 0; i < vSubArguments.size(); i++) { - FormulaToken *pCur = vSubArguments[i]->GetFormulaToken(); + pCur = vSubArguments[i]->GetFormulaToken(); assert(pCur); if (pCur->GetType() == formula::svDoubleVectorRef) { @@ -4066,7 +4066,7 @@ vSubArguments) ss << " double tmp = 0;\n"; for (unsigned i = 0; i < vSubArguments.size(); i++) { - FormulaToken *pCur = vSubArguments[i]->GetFormulaToken(); + pCur = vSubArguments[i]->GetFormulaToken(); assert(pCur); if (pCur->GetType() == formula::svDoubleVectorRef) { @@ -4334,13 +4334,13 @@ void OpRsq::GenSlidingWindowFunction( ss <<"\n"; for (i = 0; i < vSubArguments.size(); i++) { - FormulaToken *pCur = vSubArguments[i]->GetFormulaToken(); + pCur = vSubArguments[i]->GetFormulaToken(); assert(pCur); if (pCur->GetType() == formula::svDoubleVectorRef) { const formula::DoubleVectorRefToken* pDVR = dynamic_cast(pCur); - size_t nCurWindowSize = pDVR->GetRefRowSize(); + nCurWindowSize = pDVR->GetRefRowSize(); ss << "for (int i = "; if (!pDVR->IsStartFixed() && pDVR->IsEndFixed()) { #ifdef ISNAN @@ -5354,13 +5354,13 @@ void OpKurt:: GenSlidingWindowFunction(std::stringstream &ss, ss << " double tmp = 0;\n"; for (unsigned i = 0; i < vSubArguments.size(); i++) { - FormulaToken *pCur = vSubArguments[i]->GetFormulaToken(); + pCur = vSubArguments[i]->GetFormulaToken(); assert(pCur); if (pCur->GetType() == formula::svDoubleVectorRef) { const formula::DoubleVectorRefToken* pDVR = dynamic_cast(pCur); - size_t nCurWindowSize = pDVR->GetRefRowSize(); + nCurWindowSize = pDVR->GetRefRowSize(); ss << " for (int i = 0; i <" << nCurWindowSize; ss << "; i++)\n"; ss << " {\n"; -- cgit v1.2.3