summaryrefslogtreecommitdiff
path: root/sc/source/core/opencl
diff options
context:
space:
mode:
authorTor Lillqvist <tml@collabora.com>2014-11-03 11:01:30 +0200
committerTor Lillqvist <tml@collabora.com>2014-11-06 11:49:24 +0200
commitcd911ddb3f37fc84fdf3c6463b98dcff2074e08c (patch)
treeaa3e87425be352d92530765276c64ca0fdefe5cf /sc/source/core/opencl
parent66d1d902ac63e00347f365af5a79bbee02fc832b (diff)
Indent the generated OpenCL a bit saner
Change-Id: Ie180d47558bdb9496ef55e39652f33ef52d1addb
Diffstat (limited to 'sc/source/core/opencl')
-rw-r--r--sc/source/core/opencl/op_spreadsheet.cxx16
1 files changed, 8 insertions, 8 deletions
diff --git a/sc/source/core/opencl/op_spreadsheet.cxx b/sc/source/core/opencl/op_spreadsheet.cxx
index 221ee364bb2d..d9809ef9bf63 100644
--- a/sc/source/core/opencl/op_spreadsheet.cxx
+++ b/sc/source/core/opencl/op_spreadsheet.cxx
@@ -159,17 +159,16 @@ void OpVLookup::GenSlidingWindowFunction(std::stringstream &ss,
ss << ")\n";
if( !(vSubArguments[1+j]->IsMixedArgument()))
{
- ss << "{";
+ ss << " {\n";
ss << " tmp = ";
vSubArguments[1+j]->GenDeclRef(ss);
ss << "[rowNum];\n";
- ss << "}";
+ ss << " }\n";
}
else
{
- ss << "{";
-
+ ss << " {\n";
ss << " tmp = isNan(";
vSubArguments[1+j]->GenNumDeclRef(ss);
ss << "[rowNum])?";
@@ -177,11 +176,11 @@ void OpVLookup::GenSlidingWindowFunction(std::stringstream &ss,
ss << "[rowNum]:";
vSubArguments[1+j]->GenStringDeclRef(ss);
ss << "[rowNum];\n";
- ss << "}";
+ ss << " }\n";
}
}
- ss << " return tmp;\n";
+ ss << " return tmp;\n";
ss << " }\n";
ss << " for (int i = ";
if (!pCurDVR->IsStartFixed() && pCurDVR->IsEndFixed()) {
@@ -218,7 +217,8 @@ void OpVLookup::GenSlidingWindowFunction(std::stringstream &ss,
ss << 1+i;
ss << ";\n";
ss << " }\n";
- ss << " }else\n";
+ ss << " }\n";
+ ss << " else\n";
ss << " {\n";
ss << " if(tmp0 == tmp";
ss << 1+i;
@@ -259,7 +259,7 @@ void OpVLookup::GenSlidingWindowFunction(std::stringstream &ss,
}
}
- ss << " return tmp;\n";
+ ss << " return tmp;\n";
ss << " }\n";
}