summaryrefslogtreecommitdiff
path: root/opencl
diff options
context:
space:
mode:
authorLuboš Luňák <l.lunak@collabora.com>2018-10-12 11:34:20 +0200
committerLuboš Luňák <l.lunak@collabora.com>2018-11-14 16:09:16 +0100
commit12c95935f265b484c0a2fa13470085710729c903 (patch)
treea05fe2319f5acf42bee46ad9da7d64c573d5fe20 /opencl
parent7fb235b21d43f3afa340dfeb53efffd516ee21fd (diff)
$SC_FORCE_CALCULATION to force Calc use opencl/threads for everything
So that e.g. unit tests can be easily run with OpenCL forced. This forces even single cells to be evaluated using the forced method (many correctness tests are just a single cell which normally would not be used for grouped calculation). Change-Id: If5c6e77a6e0d8696d5416d760cf5e47b8acf3d27 Reviewed-on: https://gerrit.libreoffice.org/63188 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
Diffstat (limited to 'opencl')
-rw-r--r--opencl/source/openclwrapper.cxx5
1 files changed, 5 insertions, 0 deletions
diff --git a/opencl/source/openclwrapper.cxx b/opencl/source/openclwrapper.cxx
index 4383930ec0d4..436906340c53 100644
--- a/opencl/source/openclwrapper.cxx
+++ b/opencl/source/openclwrapper.cxx
@@ -761,6 +761,11 @@ void findDeviceInfoFromDeviceId(cl_device_id aDeviceId, size_t& rDeviceId, size_
bool canUseOpenCL()
{
+ if( const char* env = getenv( "SC_FORCE_CALCULATION" ))
+ {
+ if( strcmp( env, "opencl" ) == 0 )
+ return true;
+ }
return !getenv("SAL_DISABLE_OPENCL") && officecfg::Office::Common::Misc::UseOpenCL::get();
}