path: root/opencl
AgeCommit message (Collapse)AuthorFilesLines
2017-07-18loplugin:constparams in i18npool,opencl,svlNoel Grandin2-9/+9
Change-Id: I23368c3ce6d29c7b2e758e209e5a8315e82a2818 Reviewed-on: Tested-by: Jenkins <> Reviewed-by: Noel Grandin <>
2017-06-26loplugin:oncevar in oox..saxNoel Grandin1-2/+1
Change-Id: I0fee8bcddaeea48335e3be05761d2ad2c45020e2 Reviewed-on: Tested-by: Jenkins <> Reviewed-by: Noel Grandin <>
2017-06-04no need to construct unique_ptr hereJochen Nitschke1-1/+1
and std::move is not needed when returning unique_ptr Change-Id: I9b4d2d6b8a41b570a9bd99e44a743ff161b78c59 Reviewed-on: Tested-by: Jenkins <> Reviewed-by: Noel Grandin <>
2017-06-02Improved loplugin:redundantcast static_cast handling: openclStephan Bergmann1-2/+2
Change-Id: I45fc65e3b27e0c57d041c4f724c23d90ec1448d3
2017-05-31clang-tidy readability-redundant-control-flowNoel Grandin1-2/+0
Change-Id: I832f7ef0f1bd55e365db7e49823fe8bc30390c04 Reviewed-on: Tested-by: Jenkins <> Reviewed-by: Noel Grandin <>
2017-05-30teach redundantcast plugin about functional castsNoel Grandin1-5/+5
Change-Id: Iac8ccd17d9e46ebb2cb55db7adb06c469bbd4ea0 Reviewed-on: Reviewed-by: Noel Grandin <> Tested-by: Noel Grandin <>
2017-05-28remove unnecessary use of OString::getStrNoel Grandin1-1/+1
Change-Id: I0490efedf459190521f4339854b3394d57765fdb Reviewed-on: Tested-by: Jenkins <> Reviewed-by: Noel Grandin <>
2017-05-17Turn macro into functionStephan Bergmann1-6/+7
Change-Id: I6df7a287da74e49857e7fa3f0ba1cf67ab3bc74a
2017-04-26Revert the wrong "cleanup" change.Kohei Yoshida1-1/+4
Introduced by 63df0796f5ec500f3b6fb34510d4bc79c009e76d. Change-Id: I2481bcef144bd30571e69130d22f6d313dbddfea Reviewed-on: Tested-by: Jenkins <> Reviewed-by: Noel Grandin <>
2017-04-25tools: svstream.hxx needs only errcode.hxx & not errinf.hxxChris Sherlock1-0/+2
Change-Id: Ia28e35ae5af4f601e9a586a3deffbcd61702b0ca Reviewed-on: Tested-by: Jenkins <> Reviewed-by: Chris Sherlock <>
2017-04-24clang-tidy readability-simplify-boolean-expr in oox..salNoel Grandin2-9/+3
Change-Id: I1e14e5b15d2dd9e35477f8189cbecf0b443b9381 Reviewed-on: Tested-by: Jenkins <> Reviewed-by: Noel Grandin <>
2017-01-22cppcheck: memleak (false positive)Jochen Nitschke1-3/+2
but manage ownership from start Change-Id: I22d855d89bd93c56fbbcc1fb64e757fc950aa791 Reviewed-on: Tested-by: Jenkins <> Reviewed-by: Noel Grandin <>
2017-01-10New loplugin:conststringvar: openclStephan Bergmann1-1/+1
Change-Id: Ib5762151cff4c903c73ec8d487ec8fbe54a9255a
2016-12-21No apparent reason for an unnamed namespace in an include file hereStephan Bergmann1-5/+0
Change-Id: I1017459520ba4f0e544f0fa00419789c8cd86609
2016-10-24tdf#103395 opencl: don't initialize OpenCL when disabledTomaž Vajngerl1-3/+18
If SAL_DISABLE_OPENCL is set we don't want to do any kind of OpenCL initialization. Put an extra guard in fillOpenCLInfo (and similar methods in opencl package) to prevent that. Put the check if OpenCL can be used into one place which checks SAL_DISABLE_OPENCL and UseOpenCL in configuration. Change-Id: Icc216d4299d3a7942843117ab9b9411de8075b11 Reviewed-on: Tested-by: Jenkins <> Reviewed-by: Tomaž Vajngerl <>
2016-10-18opencl: convert to C++11 for loopTomaž Vajngerl1-7/+5
Change-Id: Id96a3816eb7ef2241f5a6a57b164e1e366eb357a Reviewed-on: Tested-by: Jenkins <> Reviewed-by: Tomaž Vajngerl <>
2016-10-18tdf#103204 opencl: initialize command queue on demandTomaž Vajngerl1-33/+48
Change-Id: Ie3da1d6ec91e951b1ffc15abf376c7af57789e47 Reviewed-on: Reviewed-by: Tomaž Vajngerl <> Tested-by: Tomaž Vajngerl <>
2016-10-16clang-cl loplugin: openclStephan Bergmann1-1/+1
Change-Id: I7e0e79d67d6701e519f841d893c9b7b2f5ebef80 Reviewed-on: Tested-by: Jenkins <> Reviewed-by: Stephan Bergmann <>
2016-10-01Fix typosAndrea Gelmini1-1/+1
Change-Id: Icfc61fcc5ace717bca4bea988243674afe31e6f8 Reviewed-on: Tested-by: Jenkins <> Reviewed-by: Noel Grandin <>
2016-09-21Valgrind reports read of uninitialized bCLBoolStephan Bergmann1-1/+3
...during e.g. CppunitTest_sc_subsequent_filters_test, where CL_DEVICE_LINKER_AVAILABLE is apparently a later addition (<https://> mentions it while < clGetDeviceInfo.html> doesn't). Change-Id: Icdaeffa4adb0765a6317f443130fa295761eb93f
2016-09-15replace sal_Size with std::size_t (or sal_uInt64 for SvStream pos)Michael Stahl1-1/+1
... except in include/rtl, include/sal, include/uno, where sal_Size is retained for compatibility, and where callers of rtl functions pass in pointers that are incompatible on MSVC. Change-Id: I8344453780689f5120ba0870e44965b6d292450c
2016-08-30loplugin:stringconstant: adapt to improved OUStringLiteral1 (opencl)Stephan Bergmann1-1/+1
Change-Id: I0da7434b67148824d1c2343f8ecb2b069df6baa2
2016-08-27put StreamMode masks in scope of enum classJochen Nitschke1-1/+1
Change-Id: I77682f7e289a59b986bb84edf014029a20266470 Reviewed-on: Tested-by: Jenkins <> Reviewed-by: Noel Grandin <> Tested-by: Noel Grandin <>
2016-08-19coverity#1371130 'Constant' variable guards dead codeCaolán McNamara1-5/+8
Change-Id: I94ac63f009cb398ef88e4889084bb9a99eb8bf6c
2016-08-14tdf#100965: Restart on initialisation-time OpenCL crashTor Lillqvist1-0/+6
Add a flag to the OpenCLZone indicating whether we are performing the first-start OpenCL functionality verification, so that if we run into a crash that is caught by the VCL VCLExceptionSignal_impl() handler, we terminate the process with the EXITHELPER_NORMAL_RESTART status after first having disabled OpenCL use. The wrapper process will then restart soffice.bin. This is for Windows only so far. This matches what we do if OpenGL fails early during start of LibreOffice. Change-Id: Ibb9bf3a86b7521bf16728de2a118ad4323be674b Reviewed-on: Reviewed-by: Tor Lillqvist <> Tested-by: Tor Lillqvist <>
2016-08-05loplugin:countusersofdefaultparams in oox..sdNoel Grandin1-1/+1
Change-Id: I4504939a3957606979c6ac36af6611e1fe072d01 Reviewed-on: Tested-by: Jenkins <> Reviewed-by: Noel Grandin <>
2016-07-27improve passstuffbyref return analysisNoel Grandin3-3/+3
Change-Id: I4258bcc97273d8bb7a8c4879fac02a427f76e18c Reviewed-on: Tested-by: Jenkins <> Reviewed-by: Noel Grandin <>
2016-07-26Need to try to avoid TDR also with NVIDIA cards on Windows 7 or earlierLaszlo Nemeth1-3/+38
(TDR is Timeout detection and recovery, was introduced in Vista.) Change-Id: Ic49629adf7630e61cebcdfcc431ca96ba3fbaf7e Reviewed-on: Tested-by: Jenkins <> Reviewed-by: Tor Lillqvist <>
2016-07-22SAL_DETAIL_WHERE already ends with a spaceTor Lillqvist1-1/+1
Change-Id: I273e0e4301246122bd9e02556b771dc485877350
2016-07-12tdf#100883 - opencl impls. that use SEH are still bad.Michael Meeks1-0/+1
Amazingly we fell-back to the old calculation path for crashes in older LibreOffices, might as well have this on master. Change-Id: Ifc1de41c93329207d7a1917c736e361d840c2821 Reviewed-on: Tested-by: Jenkins <> Reviewed-by: Michael Meeks <>
2016-07-12desktop: validate OpenCL drivers before use.Michael Meeks3-2/+13
OpenCL validation needs to happen before drivers are used in anger. This should isolate any crashes, and/or mis-behavior to We use app version, CL driver version and file time-stamp to trigger re-testing the device. If anything fails: hard disable OpenCL. We use an opencl validation sheet (cl-test.ods) and install it. It is a minimal CL set - it requires a very short formula group length, and combines several CL functions into few formulae to test more. The sheet structure, in particular the manual squaring / SQRT is necessary to stick within the default CL subset, and ensure that formulae are CL enabled from the root of the dependency tree up. Change-Id: I18682dbdf9a8ba9c16d52bad4447e9acce97f0a3 Reviewed-on: Tested-by: Jenkins <> Reviewed-by: Michael Meeks <>
2016-07-12Remove bogus dependency from opencl to configmgrStephan Bergmann1-1/+0
Since f41eb66302208f384a475fb20c98b6d1b0676cb6 "opencl: OpenCLZone, detect CL device change and disable CL on crash" vcl links against opencl (so indirectly linked against configmgr), which caused CppunitTest_configmgr_unit to include the configmgr object files both statically (through gb_CppunitTest_use_library_objects) and through the linked-in configmgr dynamic library, which in turn caused ASan builds to report an ODR violation for a doubly defined 'typeinfo name for configmgr::Access'. Change-Id: I9ae8637ac02c116dd2d03017f2ebb4004f4b14ad
2016-07-11loplugin:nullptr: Better heuristic to determine code shared between C and C++Stephan Bergmann1-3/+3
Change-Id: I51e1c5fa4639e51fac90f92adf3d87d12960d589
2016-07-11opencl: OpenCLZone, detect CL device change and disable CL on crashTomaž Vajngerl5-51/+131
Guard OpenCL calls with OpenCLZone, so if a OpenCL call crashes we detect this and disable OpenCL so next time the user doesn't encounter the crash at the same calculation because he has a broken OpenCL drivers. Similar has been implemented for OpenGL with good results. Additionaly we persistently remember a known good OpenCL device ID and driver version so we can match this and perform calculation tests when they change. This is to ensure that the selected OpenCL device performs as we expect. In this commit the calculation tests aren't included yet. Remove complex static initializer in opencl wrapper library. Change-Id: I1a8b81ee31298731efcf63dc6a476955afc035e9 Reviewed-on: Reviewed-by: Tomaž Vajngerl <> Tested-by: Tomaž Vajngerl <>
2016-07-01tdf#90336 - further cleanup of OpenCL options page.Michael Meeks1-0/+5
Still problematic; since we only show OpenCL as being available if it has already been initialized and used. Change-Id: I5e82a3f778f4f2025408330b6d9da51402d01e79 Reviewed-on: Tested-by: Jenkins <> Reviewed-by: Michael Meeks <>
2016-06-29Don't waste too much time evaluating the "score" for the "native CPU"Tor Lillqvist1-3/+14
This code took tens of second typically, which is utterly pointless. Instead run the loop for max a second, after which estimate how long it would have taken to process all of the data. Don't confuse the "native CPU" term here with a CPU-based device of an actual OpenCL implementation. That is a completely different thing. This "native CPU" thing here is just our way to estimate how much time it takes to do calculations using normal C++ code on the CPU. Change-Id: I92f5eedc06bbaaef6a9b5322fefec9d41f0db505 Reviewed-on: Reviewed-by: Michael Meeks <> Tested-by: Jenkins <>
2016-06-27Add some SAL_INFO outputTor Lillqvist1-0/+6
Change-Id: I8b47034f5b1fed465415399de89979102df8d9a7
2016-06-27Add some informative commentsTor Lillqvist1-0/+5
Change-Id: I3c85543efe824c06781486aff2d836e5ba48e66e
2016-06-08Let loplugin:passstuffbyref also look at fn defn not preceded by any declStephan Bergmann2-4/+4
Change-Id: I752bc96d2d521d790e919283cabb14b6526626f4
2016-06-06tools: rename SvStream::Read/Write to ReadBytes/WriteBytesMichael Stahl1-2/+2
Change-Id: Ib788a30d413436aa03f813aa2fddcbc4d6cd2f9a Reviewed-on: Tested-by: Jenkins <> Reviewed-by: Michael Stahl <>
2016-06-06Ensure that OpenCL device id returned from getDeviceSelection() is valid.Mark Hung2-3/+10
Change-Id: I756bb57d471db3d3ca1d9c3733d359c7c16b4e66 Reviewed-on: Tested-by: Jenkins <> Reviewed-by: Mark Page <> Reviewed-by: Tomaž Vajngerl <>
2016-05-26cppcheck: noExplicitConstructorCaolán McNamara1-1/+1
Change-Id: Ibb6bc9a17418a8fb0b5f882285088a5b80fd5beb
2016-05-10Fix typosAndrea Gelmini1-1/+1
Change-Id: I1c1894fcf533291b34a662b6efb96dcfa75b92b3 Reviewed-on: Tested-by: Jenkins <> Reviewed-by: Michael Stahl <>
2016-05-05clang-tidy modernize-loop-convert in oox to saxNoel Grandin1-6/+5
Change-Id: If0d87b6679765fc6d1f9300c6972845cf3742b9c Reviewed-on: Reviewed-by: Noel Grandin <> Tested-by: Noel Grandin <>
2016-04-29coverity#1358844 Uninitialized pointer fieldCaolán McNamara1-0/+3
Change-Id: I66f34570c49f647cb1fd7775ef263e5e720d8064
2016-04-29coverity#1358843 Argument cannot be negativeCaolán McNamara1-1/+1
Change-Id: I97911406d55464f042922a2e37b33f92e2c024ef
2016-04-26update loplugin stylepolice to check local pointers varsNoel Grandin1-2/+2
are actually pointer vars. Also convert from regex to normal code, so we can enable this plugin all the time. Change-Id: Ie36a25ecba61c18f99c77c77646d6459a443cbd1 Reviewed-on: Tested-by: Jenkins <> Reviewed-by: Noel Grandin <>
2016-04-22Various loplugin warnings in opencl/Stephan Bergmann3-12/+10
Change-Id: Ia6254777bc7972e2272dba542e315a8d3bd0fdf0
2016-04-22opencl: better logging of devices and device selectionTomaž Vajngerl5-566/+539
changes: - Clew misses a lot of things, added defines needed for gathering platform and device info. - Refactored profile saving and loading to use libxml2 instead the weird type of saving the profile data. - Added an additional "log" file which is similar to the OpenGL but it writes the OpenCL relevant information like which devices and platforms are available (+ all the extra useful version information) and which device was selected (if any at all). Change-Id: I0fe793c756f8f4f1761fe120fc361df36e581903 Reviewed-on: Reviewed-by: Tomaž Vajngerl <> Tested-by: Tomaž Vajngerl <>
2016-04-12Move clew/clew.h into external, tooStephan Bergmann1-1/+1
For consistency with what 38cd1d9a5f00dc69ba0d60e2fe6957090c7a26d1 "clew: move this foreign code to external/clew" did for clew.c. Library_scfilt depends on clew/clew.h, simply make it depend on the full clew external. Change-Id: Idcbf56a69084e108832c8970507ebea0f7ff400b Reviewed-on: Tested-by: Jenkins <> Reviewed-by: Stephan Bergmann <>