summaryrefslogtreecommitdiffstats
path: root/opencl
Commit message (Collapse)AuthorAgeFilesLines
* $SC_FORCE_CALCULATION to force Calc use opencl/threads for everythingLuboš Luňák2018-11-141-0/+5
| | | | | | | | | | | | 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>
* clang-tidy: (WIP) bugprone-too-small-loop-variable findingsTamás Zolnai2018-11-011-1/+1
| | | | | | | 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>
* remove more rtl::OUString and OString prefixesNoel Grandin2018-10-241-4/+4
| | | | | | | | | which seem to have snuck back in since the great rounds of removals. Change-Id: I85f7f5f4801c0b48dae8b50f51f83595b286d6a1 Reviewed-on: https://gerrit.libreoffice.org/62229 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
* tdf#42949 Fix IWYU warnings in include/opencl/*Gabor Kelemen2018-10-241-0/+1
| | | | | | | | | | Found with bin/find-unneeded-includes Only removal proposals are dealt with here. Change-Id: I76f15a8e7724384e8ba773621bdcac1351b32a0a Reviewed-on: https://gerrit.libreoffice.org/62086 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
* clang-tidy readability-simplify-boolean-exprNoel Grandin2018-10-181-4/+1
| | | | | | | Change-Id: I78fa01a6c803dec782488490b730af3a11814d64 Reviewed-on: https://gerrit.libreoffice.org/61902 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
* loplugin:constfields in ooxNoel Grandin2018-10-151-1/+1
| | | | | | | Change-Id: I1e110d193ebfa30ab1ab0d85bfb6dc409e341439 Reviewed-on: https://gerrit.libreoffice.org/61728 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
* New loplugin:externalStephan Bergmann2018-09-171-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ...warning about (for now only) functions and variables with external linkage that likely don't need it. The problems with moving entities into unnamed namespacs and breaking ADL (as alluded to in comments in compilerplugins/clang/external.cxx) are illustrated by the fact that while struct S1 { int f() { return 0; } }; int f(S1 s) { return s.f(); } namespace N { struct S2: S1 { int f() { return 1; } }; int f(S2 s) { return s.f(); } } int main() { return f(N::S2()); } returns 1, both moving just the struct S2 into an nunnamed namespace, struct S1 { int f() { return 0; } }; int f(S1 s) { return s.f(); } namespace N { namespace { struct S2: S1 { int f() { return 1; } }; } int f(S2 s) { return s.f(); } } int main() { return f(N::S2()); } as well as moving just the function f overload into an unnamed namespace, struct S1 { int f() { return 0; } }; int f(S1 s) { return s.f(); } namespace N { struct S2: S1 { int f() { return 1; } }; namespace { int f(S2 s) { return s.f(); } } } int main() { return f(N::S2()); } would each change the program to return 0 instead. Change-Id: I4d09f7ac5e8f9bcd6e6bde4712608444b642265c Reviewed-on: https://gerrit.libreoffice.org/60539 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
* create appendCopy method in OUStringBufferNoel Grandin2018-08-141-2/+2
| | | | | | | | | | | | | | | | so we can avoid temporary copies when appending a substring of an OUString to the buffer. I would have preferred to call the method just "append" but that results in ambiguous method errors when the callsite is something like sal_Int32 n; OUStringBuffer s; s.append(n, 10); I'm not sure why Change-Id: I6b5b6641fcb5b26ce2269f89ef06e03c0b6aa76f Reviewed-on: https://gerrit.libreoffice.org/58666 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
* new loplugin:stringloop, and applied in variousNoel Grandin2018-07-271-5/+6
| | | | | | | | | | look for OUString being appended to in a loop, better to use OUStringBuffer to accumulate the results. Change-Id: Ia36e06e2781a7c546ce9cbad62727aa4c5f10c4b Reviewed-on: https://gerrit.libreoffice.org/58092 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
* tdf#42949 Fix IWYU warnings in include/sal/Gabor Kelemen2018-06-221-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>
* tdf#42949 remove unused compheler includes ..Jochen Nitschke2018-06-051-1/+0
| | | | | | | | | and fix the fallout Change-Id: I15bc5d626f4d157cbc69a87392078b41e621d14e Reviewed-on: https://gerrit.libreoffice.org/54882 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
* convert a<b?a:b to std::min(a,b)Noel Grandin2018-01-151-1/+2
| | | | | | | | | | | | 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>
* More loplugin:cstylecast: openclStephan Bergmann2018-01-122-3/+3
| | | | | | | | 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
* Explicitly qualify ICU types with icu:: namespaceEike Rathke2017-12-191-1/+1
| | | | | | | | | | It will be required by ICU 61 anyway, see https://ssl.icu-project.org/repos/icu/trunk/icu4c/readme.html#RecBuild Change-Id: Ib7accd75a6e35932048d779cf7bf0a5a33f8ed0d Reviewed-on: https://gerrit.libreoffice.org/46741 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Eike Rathke <erack@redhat.com>
* Extract XmlWriter and XmlWalker from opencl into toolsTomaž Vajngerl2017-11-011-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>
* loplugin:constmethod in idl,helpcompilerNoel Grandin2017-10-301-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>
* loplugin:includeform: openclStephan Bergmann2017-10-233-3/+3
| | | | Change-Id: I3646ae6fa573c673b27e6d8a552883687c98aad2
* Use explicit function names for fooA/fooW WinAPI; prefer fooWMike Kaganski2017-09-301-2/+2
| | | | | | | | | | | | | | | | | | We should only use generic foo function name when it takes params that are also dependent on UNICODE define, like LoadCursor( nullptr, IDC_ARROW ) where IDC_ARROW is defined in MSVC headers synchronised with LoadCursor definition. We should always use Unicode API for any file paths operations, because otherwise we will get "?" for any character in path that is not in current non-unicode codepage, which will result in failed file operations. Change-Id: I3a7f453ca0f893002d8a9764318919709fd8b633 Reviewed-on: https://gerrit.libreoffice.org/42935 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
* Add tools::Time::GetMonotonicTicks (us)Jan-Marek Glogowski2017-09-151-67/+6
| | | | | | | | | | | | 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>
* Get rid of need to use initial :: for ::opencl to avoid clash with sc::openclTor Lillqvist2017-08-254-46/+39
| | | | | | | | | 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
* loplugin:oncevarNoel Grandin2017-07-311-1/+1
| | | | | | | | | 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>
* loplugin:constparams in i18npool,opencl,svlNoel Grandin2017-07-182-9/+9
| | | | | | | 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>
* loplugin:oncevar in oox..saxNoel Grandin2017-06-261-2/+1
| | | | | | | 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>
* no need to construct unique_ptr hereJochen Nitschke2017-06-041-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>
* Improved loplugin:redundantcast static_cast handling: openclStephan Bergmann2017-06-021-2/+2
| | | | Change-Id: I45fc65e3b27e0c57d041c4f724c23d90ec1448d3
* clang-tidy readability-redundant-control-flowNoel Grandin2017-05-311-2/+0
| | | | | | | Change-Id: I832f7ef0f1bd55e365db7e49823fe8bc30390c04 Reviewed-on: https://gerrit.libreoffice.org/38215 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
* teach redundantcast plugin about functional castsNoel Grandin2017-05-301-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>
* remove unnecessary use of OString::getStrNoel Grandin2017-05-281-1/+1
| | | | | | | 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>
* Turn macro into functionStephan Bergmann2017-05-171-6/+7
| | | | Change-Id: I6df7a287da74e49857e7fa3f0ba1cf67ab3bc74a
* Revert the wrong "cleanup" change.Kohei Yoshida2017-04-261-1/+4
| | | | | | | | | Introduced by 63df0796f5ec500f3b6fb34510d4bc79c009e76d. Change-Id: I2481bcef144bd30571e69130d22f6d313dbddfea Reviewed-on: https://gerrit.libreoffice.org/36968 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
* tools: svstream.hxx needs only errcode.hxx & not errinf.hxxChris Sherlock2017-04-251-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>
* clang-tidy readability-simplify-boolean-expr in oox..salNoel Grandin2017-04-242-9/+3
| | | | | | | Change-Id: I1e14e5b15d2dd9e35477f8189cbecf0b443b9381 Reviewed-on: https://gerrit.libreoffice.org/36875 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
* cppcheck: memleak (false positive)Jochen Nitschke2017-01-221-3/+2
| | | | | | | | | but manage ownership from start Change-Id: I22d855d89bd93c56fbbcc1fb64e757fc950aa791 Reviewed-on: https://gerrit.libreoffice.org/33391 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
* New loplugin:conststringvar: openclStephan Bergmann2017-01-101-1/+1
| | | | Change-Id: Ib5762151cff4c903c73ec8d487ec8fbe54a9255a
* No apparent reason for an unnamed namespace in an include file hereStephan Bergmann2016-12-211-5/+0
| | | | Change-Id: I1017459520ba4f0e544f0fa00419789c8cd86609
* tdf#103395 opencl: don't initialize OpenCL when disabledTomaž Vajngerl2016-10-241-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: https://gerrit.libreoffice.org/30025 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
* opencl: convert to C++11 for loopTomaž Vajngerl2016-10-181-7/+5
| | | | | | | Change-Id: Id96a3816eb7ef2241f5a6a57b164e1e366eb357a Reviewed-on: https://gerrit.libreoffice.org/29693 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
* tdf#103204 opencl: initialize command queue on demandTomaž Vajngerl2016-10-181-33/+48
| | | | | | | Change-Id: Ie3da1d6ec91e951b1ffc15abf376c7af57789e47 Reviewed-on: https://gerrit.libreoffice.org/29802 Reviewed-by: Tomaž Vajngerl <quikee@gmail.com> Tested-by: Tomaž Vajngerl <quikee@gmail.com>
* clang-cl loplugin: openclStephan Bergmann2016-10-161-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>
* Fix typosAndrea Gelmini2016-10-011-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>
* Valgrind reports read of uninitialized bCLBoolStephan Bergmann2016-09-211-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
* replace sal_Size with std::size_t (or sal_uInt64 for SvStream pos)Michael Stahl2016-09-151-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
* loplugin:stringconstant: adapt to improved OUStringLiteral1 (opencl)Stephan Bergmann2016-08-301-1/+1
| | | | Change-Id: I0da7434b67148824d1c2343f8ecb2b069df6baa2
* put StreamMode masks in scope of enum classJochen Nitschke2016-08-271-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>
* coverity#1371130 'Constant' variable guards dead codeCaolán McNamara2016-08-191-5/+8
| | | | Change-Id: I94ac63f009cb398ef88e4889084bb9a99eb8bf6c
* tdf#100965: Restart on initialisation-time OpenCL crashTor Lillqvist2016-08-141-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: https://gerrit.libreoffice.org/28086 Reviewed-by: Tor Lillqvist <tml@collabora.com> Tested-by: Tor Lillqvist <tml@collabora.com>
* loplugin:countusersofdefaultparams in oox..sdNoel Grandin2016-08-051-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>
* improve passstuffbyref return analysisNoel Grandin2016-07-273-3/+3
| | | | | | | Change-Id: I4258bcc97273d8bb7a8c4879fac02a427f76e18c Reviewed-on: https://gerrit.libreoffice.org/27317 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
* Need to try to avoid TDR also with NVIDIA cards on Windows 7 or earlierLaszlo Nemeth2016-07-261-3/+38
| | | | | | | | | (TDR is Timeout detection and recovery, was introduced in Vista.) Change-Id: Ic49629adf7630e61cebcdfcc431ca96ba3fbaf7e Reviewed-on: https://gerrit.libreoffice.org/27518 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Tor Lillqvist <tml@collabora.com>
* SAL_DETAIL_WHERE already ends with a spaceTor Lillqvist2016-07-221-1/+1
| | | | Change-Id: I273e0e4301246122bd9e02556b771dc485877350