summaryrefslogtreecommitdiff
path: root/opencl/source/opencl_device.cxx
AgeCommit message (Collapse)Author
2019-08-20loplugin:constvars in i18npool..openclNoel Grandin
Change-Id: I82738a18ff116fdc78f07b453c93b1b631632caf Reviewed-on: https://gerrit.libreoffice.org/77775 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-07-23Fix typosAndrea Gelmini
Change-Id: Iea3bd498b1c8934f37085bdf6df71b073e4a871c Reviewed-on: https://gerrit.libreoffice.org/76203 Tested-by: Jenkins Reviewed-by: Andrea Gelmini <andrea.gelmini@gelma.net>
2019-05-29tdf#42949 Fix IWYU warnings in opencl/Gabor Kelemen
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-05-22New loplugin:dataStephan Bergmann
...following up on 1453c2c8f13bac64ecd1981af7cebf1c421808ac "prefer vector::data to &vector[0]" Change-Id: I7c113747d92d144a521d49b89384dd8bf1215c01 Reviewed-on: https://gerrit.libreoffice.org/72765 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2018-11-01clang-tidy: (WIP) bugprone-too-small-loop-variable findingsTamás Zolnai
Change-Id: Iaa255b39928ac45dec1ed37e368c149d6027f561 Reviewed-on: https://gerrit.libreoffice.org/62701 Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com> Tested-by: Tamás Zolnai <tamas.zolnai@collabora.com>
2018-01-15convert a<b?a:b to std::min(a,b)Noel Grandin
with something like git grep -nP '(.*)\s*<\s*(.*)\s*\?\s*\g1\s*:\s*\g2' -- *.?xx Change-Id: Id5078b35961847feb78a66204fdb7598ee63fd23 Note: we also convert a>b?b:a Reviewed-on: https://gerrit.libreoffice.org/47736 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-01-12More loplugin:cstylecast: openclStephan Bergmann
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-10-23loplugin:includeform: openclStephan Bergmann
Change-Id: I3646ae6fa573c673b27e6d8a552883687c98aad2
2017-09-15Add tools::Time::GetMonotonicTicks (us)Jan-Marek Glogowski
This moves a combination of tools::Time::GetSystemTicks(), canvas ElapsedTime::getSystemTime() and the opencl timing implementation into tools::Time::GetMonotonicTicks() as a monotonic microsecond time source. Change-Id: I5c9263540b8af55b2eeca6126e288129427f6e8e Reviewed-on: https://gerrit.libreoffice.org/41991 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2017-08-25Get rid of need to use initial :: for ::opencl to avoid clash with sc::openclTor Lillqvist
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-31loplugin:oncevarNoel Grandin
extend oncevar to any POD type Change-Id: Ia98ee0a67f183e40fb0c38477760124b2c411dc0 Reviewed-on: https://gerrit.libreoffice.org/40564 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-07-18loplugin:constparams in i18npool,opencl,svlNoel Grandin
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-26loplugin:oncevar in oox..saxNoel Grandin
Change-Id: I0fee8bcddaeea48335e3be05761d2ad2c45020e2 Reviewed-on: https://gerrit.libreoffice.org/39238 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-05-28remove unnecessary use of OString::getStrNoel Grandin
Change-Id: I0490efedf459190521f4339854b3394d57765fdb Reviewed-on: https://gerrit.libreoffice.org/38058 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-05-17Turn macro into functionStephan Bergmann
Change-Id: I6df7a287da74e49857e7fa3f0ba1cf67ab3bc74a
2016-07-27improve passstuffbyref return analysisNoel Grandin
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-11opencl: OpenCLZone, detect CL device change and disable CL on crashTomaž Vajngerl
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-29Don't waste too much time evaluating the "score" for the "native CPU"Tor Lillqvist
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: https://gerrit.libreoffice.org/26774 Reviewed-by: Michael Meeks <michael.meeks@collabora.com> Tested-by: Jenkins <ci@libreoffice.org>
2016-06-08Let loplugin:passstuffbyref also look at fn defn not preceded by any declStephan Bergmann
Change-Id: I752bc96d2d521d790e919283cabb14b6526626f4
2016-06-06Ensure that OpenCL device id returned from getDeviceSelection() is valid.Mark Hung
Change-Id: I756bb57d471db3d3ca1d9c3733d359c7c16b4e66 Reviewed-on: https://gerrit.libreoffice.org/24959 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Mark Page <aptitude@btconnect.com> Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2016-05-26cppcheck: noExplicitConstructorCaolán McNamara
Change-Id: Ibb6bc9a17418a8fb0b5f882285088a5b80fd5beb
2016-04-29coverity#1358843 Argument cannot be negativeCaolán McNamara
Change-Id: I97911406d55464f042922a2e37b33f92e2c024ef
2016-04-22Various loplugin warnings in opencl/Stephan Bergmann
Change-Id: Ia6254777bc7972e2272dba542e315a8d3bd0fdf0
2016-04-22opencl: better logging of devices and device selectionTomaž Vajngerl
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>
2016-02-04loplugin:fpcomparison in opencl/Noel Grandin
Change-Id: Ia5b4a5010afd72ce59629dbc9b2045177a155182 Reviewed-on: https://gerrit.libreoffice.org/21867 Reviewed-by: Noel Grandin <noelgrandin@gmail.com> Tested-by: Noel Grandin <noelgrandin@gmail.com>
2015-11-11new loplugin: memoryvarNoel Grandin
detect when we can convert a new/delete sequence on a local variable to use std::unique_ptr Change-Id: Iecae4e4197eccdfacfce2eed39aa4a69e4a660bc Reviewed-on: https://gerrit.libreoffice.org/19884 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2015-11-10loplugin:nullptr (automatic rewrite)Stephan Bergmann
Change-Id: I60189077f872dd5da3633b15b67b7b7729a75d0d
2015-10-07clang-analyzer-deadcode.DeadStoresStephan Bergmann
Change-Id: I95404b553f594ced1e2e8b4b8ddf34c08180128f
2015-09-14boost->stdCaolán McNamara
Change-Id: I3fd9e1599c5ad812879a58cf1dabbcd393105e1c Reviewed-on: https://gerrit.libreoffice.org/18564 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2015-06-08loplugin:cstylecast: deal with remaining pointer castsStephan Bergmann
Change-Id: I1c8cf28803694f81985b9d1c61c62d28158a2f71
2015-03-28Clean up C-style casts from pointers to voidStephan Bergmann
Change-Id: I7e6315bf2a2e3d6e089ef8f5eacc69d2b413374a
2015-03-20Typo: (O/o)veride(n)->(O/o)verride(n)Julien Nabet
Change-Id: Ied81ede9aaf045866596adc40d357cbbddb3d704
2014-11-27Clean up confusing OpenCL code a bitTor Lillqvist
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 Lillqvist
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