diff options
author | Luboš Luňák <l.lunak@collabora.com> | 2018-10-12 11:34:20 +0200 |
---|---|---|
committer | Luboš Luňák <l.lunak@collabora.com> | 2018-11-14 16:09:16 +0100 |
commit | 12c95935f265b484c0a2fa13470085710729c903 (patch) | |
tree | a05fe2319f5acf42bee46ad9da7d64c573d5fe20 /opencl | |
parent | 7fb235b21d43f3afa340dfeb53efffd516ee21fd (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.cxx | 5 |
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(); } |