diff options
author | Kohei Yoshida <kohei.yoshida@collabora.com> | 2013-09-09 10:52:42 -0400 |
---|---|---|
committer | Kohei Yoshida <kohei.yoshida@collabora.com> | 2013-09-10 11:47:44 -0400 |
commit | f4d04f2014cedacdba3eec2177a3ba4acd3d6b6f (patch) | |
tree | a5409de18d5dd1b36ec2618fe860090e4d0b2437 /sc | |
parent | e8c26959deac60eb2b7bec7a36fccacd95914304 (diff) |
Instantiate the software fallback outside of opencl code.
Change-Id: I7ec7a951492616abd3c7327b85f09c1e913208ca
Diffstat (limited to 'sc')
-rw-r--r-- | sc/source/core/opencl/formulagroupcl.cxx | 24 | ||||
-rw-r--r-- | sc/source/core/tool/formulagroup.cxx | 3 |
2 files changed, 15 insertions, 12 deletions
diff --git a/sc/source/core/opencl/formulagroupcl.cxx b/sc/source/core/opencl/formulagroupcl.cxx index 0ae58e808472..0f8b46f9988a 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 2ea09c4a54d8..6c930e53d41e 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; |