sc/source/core/tool/formulagroup.cxx |    9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

New commits:
commit 080e58a9f69ea0e1c815eb66427baf2c6b330d9e
Author:     Luboš Luňák <[email protected]>
AuthorDate: Mon Oct 15 13:40:32 2018 +0200
Commit:     Luboš Luňák <[email protected]>
CommitDate: Wed Nov 14 16:09:37 2018 +0100

    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 <[email protected]>

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
     }
_______________________________________________
Libreoffice-commits mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to