diff options
author | Michael Meeks <michael.meeks@collabora.com> | 2016-07-01 20:49:19 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2016-07-07 13:25:31 +0000 |
commit | 2a93d7221672d4fec38a265780af114d2756dbfc (patch) | |
tree | 8f24fbad533f8e522e8ac11dbe2156bd716a4ceb | |
parent | 90034b4e0b800d0f952c578a6aaa75a01c536429 (diff) |
cui: add calculation mode to Help->About.
Reviewed-on: https://gerrit.libreoffice.org/26964
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
(cherry picked from commit adc3932dfc4fe763b7db0af8843b01614bdc6aa2)
Change-Id: I4765436bed8a58c5097afcf7dce768d3ec325015
Reviewed-on: https://gerrit.libreoffice.org/27004
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
-rw-r--r-- | cui/source/dialogs/about.cxx | 13 | ||||
-rw-r--r-- | include/opencl/openclwrapper.hxx | 5 | ||||
-rw-r--r-- | opencl/source/openclwrapper.cxx | 5 |
3 files changed, 22 insertions, 1 deletions
diff --git a/cui/source/dialogs/about.cxx b/cui/source/dialogs/about.cxx index 38dad7fcd55b..615a0f757cf0 100644 --- a/cui/source/dialogs/about.cxx +++ b/cui/source/dialogs/about.cxx @@ -47,6 +47,8 @@ #include <sfx2/app.hxx> #include <rtl/ustrbuf.hxx> #include <vcl/bitmap.hxx> + +#include <opencl/openclwrapper.hxx> #include <officecfg/Office/Common.hxx> using namespace ::com::sun::star::uno; @@ -313,6 +315,17 @@ OUString AboutDialog::GetVersionString() sVersion += m_aLocaleStr.replaceAll("$LOCALE", aLocaleStr); } + OUString aCalcMode = "Calc: "; // Calc calculation mode + bool bSWInterp = officecfg::Office::Common::Misc::UseSwInterpreter::get(); + bool bOpenCL = opencl::GPUEnv::isOpenCLEnabled(); + if (bOpenCL) + aCalcMode += "CL"; + else if (bSWInterp) + aCalcMode += "group"; + else + aCalcMode += "single"; + sVersion += "; " + aCalcMode; + return sVersion; } diff --git a/include/opencl/openclwrapper.hxx b/include/opencl/openclwrapper.hxx index 24d8714ec7ce..5205aaab0767 100644 --- a/include/opencl/openclwrapper.hxx +++ b/include/opencl/openclwrapper.hxx @@ -37,7 +37,7 @@ struct KernelEnv cl_program mpkProgram; }; -struct GPUEnv +struct OPENCL_DLLPUBLIC GPUEnv { //share vb in all modules in hb library cl_platform_id mpPlatformID; @@ -50,9 +50,12 @@ struct GPUEnv bool mnKhrFp64Flag; bool mnAmdFp64Flag; cl_uint mnPreferredVectorWidthFloat; + + static bool isOpenCLEnabled(); }; extern OPENCL_DLLPUBLIC GPUEnv gpuEnv; + OPENCL_DLLPUBLIC bool generatBinFromKernelSource( cl_program program, const char * clFileName ); OPENCL_DLLPUBLIC bool buildProgramFromBinary(const char* buildOption, GPUEnv* gpuEnv, const char* filename, int idx); OPENCL_DLLPUBLIC void setKernelEnv( KernelEnv *envInfo ); diff --git a/opencl/source/openclwrapper.cxx b/opencl/source/openclwrapper.cxx index 8d57ae44e260..384e9eb03310 100644 --- a/opencl/source/openclwrapper.cxx +++ b/opencl/source/openclwrapper.cxx @@ -859,6 +859,11 @@ const char* errorString(cl_int nError) #undef CASE } +bool GPUEnv::isOpenCLEnabled() +{ + return gpuEnv.mpDevID; +} + } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |