[Libreoffice-commits] core.git: Branch 'private/kohei/formula-opencl-work' - sc/source
Kohei Yoshida
kohei.yoshida at collabora.com
Mon Sep 9 07:53:06 PDT 2013
sc/source/core/opencl/formulagroupcl.cxx | 24 ++++++++++++------------
sc/source/core/tool/formulagroup.cxx | 3 +++
2 files changed, 15 insertions(+), 12 deletions(-)
New commits:
commit d718f08f18da1fbee08e60fb8c6013abae1c7126
Author: Kohei Yoshida <kohei.yoshida at collabora.com>
Date: Mon Sep 9 10:52:42 2013 -0400
Instantiate the software fallback outside of opencl code.
Change-Id: I7ec7a951492616abd3c7327b85f09c1e913208ca
diff --git a/sc/source/core/opencl/formulagroupcl.cxx b/sc/source/core/opencl/formulagroupcl.cxx
index 0ae58e8..0f8b46f 100644
--- a/sc/source/core/opencl/formulagroupcl.cxx
+++ b/sc/source/core/opencl/formulagroupcl.cxx
@@ -1063,18 +1063,18 @@ bool FormulaGroupInterpreterGroundwater::interpret(ScDocument& rDoc, const ScAdd
}
namespace opencl {
- sc::FormulaGroupInterpreter *createFormulaGroupInterpreter()
- {
- if (getenv("SC_SOFTWARE"))
- {
- fprintf(stderr, "Create S/W interp\n");
- return new sc::FormulaGroupInterpreterSoftware();
- }
- if (getenv("SC_GROUNDWATER"))
- return new sc::FormulaGroupInterpreterGroundwater();
- else
- return new sc::FormulaGroupInterpreterOpenCL();
- }
+
+sc::FormulaGroupInterpreter *createFormulaGroupInterpreter()
+{
+ if (getenv("SC_SOFTWARE"))
+ return NULL;
+
+ if (getenv("SC_GROUNDWATER"))
+ return new sc::FormulaGroupInterpreterGroundwater();
+
+ return new sc::FormulaGroupInterpreterOpenCL();
+}
+
} // namespace opencl
} // namespace sc
diff --git a/sc/source/core/tool/formulagroup.cxx b/sc/source/core/tool/formulagroup.cxx
index 2ea09c4..6c930e5 100644
--- a/sc/source/core/tool/formulagroup.cxx
+++ b/sc/source/core/tool/formulagroup.cxx
@@ -216,7 +216,10 @@ FormulaGroupInterpreter *FormulaGroupInterpreter::getStatic()
msInstance = sc::opencl::createFormulaGroupInterpreter();
#endif
if ( !msInstance ) // software fallback
+ {
+ fprintf(stderr, "Create S/W interp\n");
msInstance = new sc::FormulaGroupInterpreterSoftware();
+ }
}
return msInstance;
More information about the Libreoffice-commits
mailing list