Kaydet (Commit) bdef079b authored tarafından Tor Lillqvist's avatar Tor Lillqvist

tdf#94924: Fix handling of empty cells in OpenCL subtraction

We get correct result by simplifying the code;)

No need to have the outer "if (gid0 < X)" test around the calculation
code generated by Reduction::GenSlidingWindowFunction(). The lhs and
rhs check the gid0 range themselves and that leads to the desired
result for subtraction.

While fixing this I noticed that the handling of empty cells in
division is also wrong. Will fix in another commit.

Change-Id: Ia45bd81e692a17b0453cc79cd4673a00e119562a
üst e5155848
...@@ -1732,13 +1732,8 @@ public: ...@@ -1732,13 +1732,8 @@ public:
assert(pCur); assert(pCur);
assert(pCur->GetType() != formula::svDoubleVectorRef); assert(pCur->GetType() != formula::svDoubleVectorRef);
if (pCur->GetType() == formula::svSingleVectorRef) if (pCur->GetType() == formula::svSingleVectorRef ||
{ pCur->GetType() == formula::svDouble)
const formula::SingleVectorRefToken* pSVR =
static_cast<const formula::SingleVectorRefToken*>(pCur);
ss << "if (gid0 < " << pSVR->GetArrayLength() << "){\n";
}
else if (pCur->GetType() == formula::svDouble)
{ {
ss << "{\n"; ss << "{\n";
} }
......
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