summaryrefslogtreecommitdiff
path: root/opencl/inc
AgeCommit message (Collapse)AuthorFilesLines
2020-12-29loplugin:stringviewparam: operator +Stephan Bergmann1-1/+5
Change-Id: I044dd21b63d7eb03224675584fa143009c6b6008 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108418 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-11-19tdf#123936 Formatting files in module opencl with clang-formatPhilipp Hofer1-3/+6
Change-Id: I16a00ceee4c2b772ec9ed6b1b349253114b22239 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105695 Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com> Tested-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com>
2020-03-12Revert "loplugin:constfields in oox"Noel Grandin1-1/+1
This reverts commit a84e3df74eecc8778e3d5be5dd80ad4ddb511edf. Now that we know that making fields has negative side effects like disabling assignment operator generation. Change-Id: I7b45b7ead281cf3a9202ca6aabc55ee5033e5331 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/90332 Tested-by: Noel Grandin <noel.grandin@collabora.co.uk> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-08-20loplugin:constvars in i18npool..openclNoel Grandin1-1/+1
Change-Id: I82738a18ff116fdc78f07b453c93b1b631632caf Reviewed-on: https://gerrit.libreoffice.org/77775 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-07-31Improved loplugin:stringconstant (now that GCC 7 supports it): openclStephan Bergmann1-2/+2
Change-Id: I8e06da641db39d529426064e6c3412bc75a67fb2 Reviewed-on: https://gerrit.libreoffice.org/76661 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-05-29tdf#42949 Fix IWYU warnings in opencl/Gabor Kelemen2-5/+3
Found with bin/find-unneeded-includes Only removal proposals are dealt with here. Change-Id: I0aedc40c49c8cb1382f45571f54873d6017ec62c Reviewed-on: https://gerrit.libreoffice.org/72637 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2019-04-29test in a separate helper process if OpenCL crashes (tdf#112252)Luboš Luňák1-0/+25
Some OpenCL implementations may be broken, e.g. pocl simply asserts and aborts if it can't find Clang. In order to protect against crashes caused by faulty OpenCL drivers, when testing OpenCL functionality on OpenCL setup change, first do a simple test in a separate helper. Change-Id: I1cf328e731c48f47745b27c7130e7521254209f5 Reviewed-on: https://gerrit.libreoffice.org/71080 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2018-10-15loplugin:constfields in ooxNoel Grandin1-1/+1
Change-Id: I1e110d193ebfa30ab1ab0d85bfb6dc409e341439 Reviewed-on: https://gerrit.libreoffice.org/61728 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-06-22tdf#42949 Fix IWYU warnings in include/sal/Gabor Kelemen1-0/+1
Found with bin/find-unneeded-includes Only removal proposals are dealt with here. Change-Id: I62758fd7c9d932c5a390739774b112356006a937 Reviewed-on: https://gerrit.libreoffice.org/56062 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2018-01-12More loplugin:cstylecast: openclStephan Bergmann1-2/+2
auto-rewrite with <https://gerrit.libreoffice.org/#/c/47798/> "Enable loplugin:cstylecast for some more cases" plus solenv/clang-format/reformat-formatted-files Change-Id: Id28f5699a4a9c0078a1326e81e833b75951f97cc
2017-11-01Extract XmlWriter and XmlWalker from opencl into toolsTomaž Vajngerl1-174/+8
In opencl we read and writer the profile xml with custom classes XmlWriter and XmlWalker for reading. This classes are useful in other places (very similar XmlWriter is used in test), so extract the code from opencl and move it to a more common place - tools. Refactoring of other usages will follow. Change-Id: I8363e87b7c30083d299080adec3f99cb33ebe4cc Reviewed-on: https://gerrit.libreoffice.org/44149 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2017-10-30loplugin:constmethod in idl,helpcompilerNoel Grandin1-1/+1
Change-Id: I9b328fc0a3ebdd15a646ee6dab800ffbadb1aaef Reviewed-on: https://gerrit.libreoffice.org/44050 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-08-25Get rid of need to use initial :: for ::opencl to avoid clash with sc::openclTor Lillqvist1-6/+3
Rename the global opencl namespace to openclwrapper. Its public API is after all declared in a file called openclwrapper.hxx. The confusion started when part of the OpenCL code was moved out from sc some years ago. Change-Id: I98ebd8498b2244804411e5de9169eb619f86070b
2017-07-18loplugin:constparams in i18npool,opencl,svlNoel Grandin1-2/+2
Change-Id: I23368c3ce6d29c7b2e758e209e5a8315e82a2818 Reviewed-on: https://gerrit.libreoffice.org/40051 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
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: https://gerrit.libreoffice.org/38385 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-05-30teach redundantcast plugin about functional castsNoel Grandin1-5/+5
Change-Id: Iac8ccd17d9e46ebb2cb55db7adb06c469bbd4ea0 Reviewed-on: https://gerrit.libreoffice.org/37910 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-04-25tools: svstream.hxx needs only errcode.hxx & not errinf.hxxChris Sherlock1-0/+2
Change-Id: Ia28e35ae5af4f601e9a586a3deffbcd61702b0ca Reviewed-on: https://gerrit.libreoffice.org/36896 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Chris Sherlock <chris.sherlock79@gmail.com>
2016-12-21No apparent reason for an unnamed namespace in an include file hereStephan Bergmann1-5/+0
Change-Id: I1017459520ba4f0e544f0fa00419789c8cd86609
2016-10-16clang-cl loplugin: openclStephan Bergmann1-1/+1
Change-Id: I7e0e79d67d6701e519f841d893c9b7b2f5ebef80 Reviewed-on: https://gerrit.libreoffice.org/29858 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2016-10-01Fix typosAndrea Gelmini1-1/+1
Change-Id: Icfc61fcc5ace717bca4bea988243674afe31e6f8 Reviewed-on: https://gerrit.libreoffice.org/29435 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
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:// www.khronos.org/registry/cl/sdk/1.2/docs/man/xhtml/clGetDeviceInfo.html> mentions it while <https://www.khronos.org/registry/cl/sdk/1.0/docs/man/xhtml/ 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-27put StreamMode masks in scope of enum classJochen Nitschke1-1/+1
Change-Id: I77682f7e289a59b986bb84edf014029a20266470 Reviewed-on: https://gerrit.libreoffice.org/28420 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com> Tested-by: Noel Grandin <noelgrandin@gmail.com>
2016-08-05loplugin:countusersofdefaultparams in oox..sdNoel Grandin1-1/+1
Change-Id: I4504939a3957606979c6ac36af6611e1fe072d01 Reviewed-on: https://gerrit.libreoffice.org/27902 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-07-27improve passstuffbyref return analysisNoel Grandin1-1/+1
Change-Id: I4258bcc97273d8bb7a8c4879fac02a427f76e18c Reviewed-on: https://gerrit.libreoffice.org/27317 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-07-12desktop: validate OpenCL drivers before use.Michael Meeks1-0/+3
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: https://gerrit.libreoffice.org/27131 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
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ž Vajngerl1-0/+4
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: https://gerrit.libreoffice.org/27064 Reviewed-by: Tomaž Vajngerl <quikee@gmail.com> Tested-by: Tomaž Vajngerl <quikee@gmail.com>
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 Bergmann1-2/+2
Change-Id: I752bc96d2d521d790e919283cabb14b6526626f4
2016-06-06tools: rename SvStream::Read/Write to ReadBytes/WriteBytesMichael Stahl1-2/+2
Change-Id: Ib788a30d413436aa03f813aa2fddcbc4d6cd2f9a Reviewed-on: https://gerrit.libreoffice.org/25972 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Stahl <mstahl@redhat.com>
2016-05-10Fix typosAndrea Gelmini1-1/+1
Change-Id: I1c1894fcf533291b34a662b6efb96dcfa75b92b3 Reviewed-on: https://gerrit.libreoffice.org/24760 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Stahl <mstahl@redhat.com>
2016-04-29coverity#1358844 Uninitialized pointer fieldCaolán McNamara1-0/+3
Change-Id: I66f34570c49f647cb1fd7775ef263e5e720d8064
2016-04-22Various loplugin warnings in opencl/Stephan Bergmann2-3/+3
Change-Id: Ia6254777bc7972e2272dba542e315a8d3bd0fdf0
2016-04-22opencl: better logging of devices and device selectionTomaž Vajngerl2-451/+368
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: https://gerrit.libreoffice.org/24270 Reviewed-by: Tomaž Vajngerl <quikee@gmail.com> Tested-by: Tomaž Vajngerl <quikee@gmail.com>
2015-10-01loplugin:unusedmethodsNoel Grandin1-15/+0
- improvements to the plugin to find more method calls - improvements to python script to remove more false+ - fix the FORCE_COMPILE_ALL build flag to include code in the $WORKDIR Change-Id: I4d6015dcb9b9d60c26f0bcee8abad807177a7836 Reviewed-on: https://gerrit.libreoffice.org/19064 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2015-09-29loplugin:removeunusedmethods, remove unused stuffNoel Grandin1-2/+0
Change-Id: I35456b2a3ad2a84a1d045f09cdfb29e4c19b8350
2015-03-28Clean up C-style casts from pointers to voidStephan Bergmann1-7/+7
Change-Id: I7e6315bf2a2e3d6e089ef8f5eacc69d2b413374a
2015-03-02OpenCL: correctly handle platforms without devicesGiuseppe Bilotta1-4/+22
When an OpenCL platform has no devices (of the requested type), calls to clGetDeviceIDs() are required to return with the error value CL_DEVICE_NOT_FOUND. Some platforms (e.g. Clover as of Mesa 10.4.2) do not touch their output parameters in such cases, which means that in some conditions the `num` variable where the number of devices of the platform should be stored may be used uninitialized. This can lead to segmentations faults in the subsequent calls to clGetDeviceInfo(). Simply reinitializing num to 0 is sufficient to prevent the segfault in the case of Mesa, but proper error handling is included for completeness. Change-Id: Ia25192f6aa953838a545a9e7c9fca050d2703b60 Reviewed-on: https://gerrit.libreoffice.org/14700 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Tor Lillqvist <tml@collabora.com>
2015-01-20Some more loplugin:cstylecast: openclStephan Bergmann1-2/+2
Change-Id: I93c590a71ea768511a89d6fe17dc7aa01fe73b02
2014-12-08Don't treat clew as part of an "external" clcc moduleTor Lillqvist1-1/+2
There is no obvious authoritative upstream for clew anyway, so it causes philosophical problems for distros. For a while, we used to use a zip archive from the "clcc" project on SourceForge that included clew.c and clew.h. (Before that we also just had clew.c and clew.h in our source repo.) So, drop the external/clcc module and have clew.c and clew.h in the source repo again. But this time clew is in a module of its own, not in sc. This re-introduces "No need to have OpenCL optional at configure-time" This reverts commit 764836cb00e8e6dfd2ab48e080a166ec90359e01. Change-Id: I413142f4f9f8399489f9c3e5327132822f07a454 Reviewed-on: https://gerrit.libreoffice.org/13368 Reviewed-by: David Tardon <dtardon@redhat.com> Tested-by: David Tardon <dtardon@redhat.com>
2014-11-27Clean up confusing OpenCL code a bitTor Lillqvist1-1/+1
Get rid of the silly OpenCLDevice class that had only static members. We can as well just use namespacing. Remove functions only used internally in openclwrapper.cxx from the now public openclwrapper.hxx header. Change-Id: If7336edd262c772564dc13e64113d72d0b52428c
2014-11-27Move more Calc-independent OpenCL stuff from the sc to the opencl moduleTor Lillqvist2-0/+666
No cleanups yet. Just removed the "sc" namespace parts now when this stuff is no longer Calc-specific. There is still horribly confusing use of the same OpenCLDevice name for both a class and as a namespace, for instance. And the OpenCLDevice class has only public static members even, so effectively it acts as just a namespace anyway... Etc. Change-Id: Idc5f30a721df0101426c676f04a85e02c5dc8443