diff options
author | Luboš Luňák <l.lunak@collabora.com> | 2018-10-15 13:40:32 +0200 |
---|---|---|
committer | Luboš Luňák <l.lunak@collabora.com> | 2018-11-14 16:09:37 +0100 |
commit | 080e58a9f69ea0e1c815eb66427baf2c6b330d9e (patch) | |
tree | 21af8052f1f5084b0c778cc28621c9aba50ee03e /sc | |
parent | 12c95935f265b484c0a2fa13470085710729c903 (diff) |
abort if opencl fails with SC_FORCE_CALCULATION=opencl
Otherwise calculation would silently fall back to other methods.
Change-Id: I3cf624b709e7007ae16736a1ecb91b7d3c18df8e
Reviewed-on: https://gerrit.libreoffice.org/63189
Tested-by: Jenkins
Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
Diffstat (limited to 'sc')
-rw-r--r-- | sc/source/core/tool/formulagroup.cxx | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/sc/source/core/tool/formulagroup.cxx b/sc/source/core/tool/formulagroup.cxx index 533c0c002d87..eef51c328496 100644 --- a/sc/source/core/tool/formulagroup.cxx +++ b/sc/source/core/tool/formulagroup.cxx @@ -164,7 +164,14 @@ FormulaGroupInterpreter *FormulaGroupInterpreter::getStatic() if (ScCalcConfig::isOpenCLEnabled()) { const ScCalcConfig& rConfig = ScInterpreter::GetGlobalConfig(); - switchOpenCLDevice(rConfig.maOpenCLDevice, rConfig.mbOpenCLAutoSelect); + if( !switchOpenCLDevice(rConfig.maOpenCLDevice, rConfig.mbOpenCLAutoSelect)) + { + if( ScCalcConfig::getForceCalculationType() == ForceCalculationOpenCL ) + { + SAL_WARN( "opencl", "OpenCL forced but failed to initialize" ); + abort(); + } + } } #endif } |