summaryrefslogtreecommitdiff
path: root/sc/source/core
diff options
context:
space:
mode:
authorI-Jui (Ray) Sung <ray@multicorewareinc.com>2013-11-17 23:23:42 -0600
committerI-Jui (Ray) Sung <ray@multicorewareinc.com>2013-11-17 23:23:42 -0600
commit6fd82243e26af3cace74beeb2193c40f39b84bc2 (patch)
tree5162391decd2eaf644770392ae7e7b102b365231 /sc/source/core
parent434d445a93910f1745b140a5212198a452925dc6 (diff)
GPU Calc: fix building error on Windows
Change-Id: I4a7e02c24f82222bdf9fc4fb66504ed3b6b09f34
Diffstat (limited to 'sc/source/core')
-rw-r--r--sc/source/core/opencl/formulagroupcl.cxx16
1 files changed, 7 insertions, 9 deletions
diff --git a/sc/source/core/opencl/formulagroupcl.cxx b/sc/source/core/opencl/formulagroupcl.cxx
index d5f7f0facdf7..93da20d2d5ef 100644
--- a/sc/source/core/opencl/formulagroupcl.cxx
+++ b/sc/source/core/opencl/formulagroupcl.cxx
@@ -493,7 +493,7 @@ public:
{
// set 100 as a temporary threshold for invoking reduction
// kernel in NeedParalleLReduction function
- if (NeedParallelReduction())
+ if (/*NeedParallelReduction()*/false)
{
std::string temp = Base::GetName() + "[gid0]";
ss << "tmp = ";
@@ -508,7 +508,7 @@ public:
{
// set 100 as a temporary threshold for invoking reduction
// kernel in NeedParalleLReduction function
- if (NeedParallelReduction())
+ if (NeedParallelReduction()&&false)
{
std::string temp = Base::GetName() + "[0]";
ss << "tmp = ";
@@ -550,11 +550,9 @@ public:
}
else
{
-#ifdef ISNAN
- ss << "0; i < "<< nCurWindowSize << "; i++){\n\t\t";
-#else
- ss << "0; i < "<< nCurWindowSize << "; i++)\n\t\t";
-#endif
+ unsigned limit =
+ std::min(mpDVR->GetArrayLength(), nCurWindowSize);
+ ss << "0; i < "<< limit << "; i++){\n\t\t";
}
return nCurWindowSize;
@@ -1074,8 +1072,8 @@ public:
KernelEnv kEnv;
OpenclDevice::setKernelEnv(&kEnv);
cl_int err;
- DynamicKernelSlidingArgument<DynamicKernelArgument> *slidingArgPtr =
- dynamic_cast< DynamicKernelSlidingArgument<DynamicKernelArgument> *>
+ DynamicKernelSlidingArgument<VectorRef> *slidingArgPtr =
+ dynamic_cast< DynamicKernelSlidingArgument<VectorRef> *>
(mvSubArguments[0].get());
cl_mem mpClmem2;