diff options
-rw-r--r-- | sc/source/core/opencl/formulagroupcl.cxx | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/sc/source/core/opencl/formulagroupcl.cxx b/sc/source/core/opencl/formulagroupcl.cxx index 4db3fb4ebe11..2501dd8d3916 100644 --- a/sc/source/core/opencl/formulagroupcl.cxx +++ b/sc/source/core/opencl/formulagroupcl.cxx @@ -1073,9 +1073,12 @@ public: ss << "i = outLoop*" << outLoopSize << "+" << count << ";\n\t"; if (count == 0) { + temp1 << "if(i < " << mpDVR->GetArrayLength(); + temp1 << "){\n\t\t"; temp1 << "tmp = legalize("; temp1 << mpCodeGen->Gen2(GenSlidingWindowDeclRef(), "tmp"); temp1 << ", tmp);\n\t\t\t"; + temp1 << "}\n\t"; } ss << temp1.str(); } @@ -1087,9 +1090,12 @@ public: ss << "i = " << count << ";\n\t"; if (count == nCurWindowSize / outLoopSize * outLoopSize) { + temp2 << "if(i < " << mpDVR->GetArrayLength(); + temp2 << "){\n\t\t"; temp2 << "tmp = legalize("; temp2 << mpCodeGen->Gen2(GenSlidingWindowDeclRef(), "tmp"); temp2 << ", tmp);\n\t\t\t"; + temp2 << "}\n\t"; } ss << temp2.str(); } |