summaryrefslogtreecommitdiffstats
path: root/opencl
Commit message (Collapse)AuthorAgeFilesLines
* Various loplugin warnings in opencl/Stephan Bergmann2016-04-223-12/+10
| | | | Change-Id: Ia6254777bc7972e2272dba542e315a8d3bd0fdf0
* opencl: better logging of devices and device selectionTomaž Vajngerl2016-04-225-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: https://gerrit.libreoffice.org/24270 Reviewed-by: Tomaž Vajngerl <quikee@gmail.com> Tested-by: Tomaž Vajngerl <quikee@gmail.com>
* Move clew/clew.h into external, tooStephan Bergmann2016-04-121-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: https://gerrit.libreoffice.org/24035 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
* The OpenCL shared library is called libOpenCL.so.1 on LinuxTor Lillqvist2016-03-291-1/+1
| | | | | | | | | | | libOpenCL.so is just the symbolic link to it, typically from a development package. (On Fedora, from ocl-icd-devel.) (Sure, libOpenCL.so.1 is also a symbolic link on Fedora, to libOpenCL.so.1.0.0. But anyway, libOpenCL.so.1 is not from a development package, but from ocl-icd.) Change-Id: I18ca2e52e025001f709b1b57e12cd01d5b52d08e
* use consistent #define checks for the Windows platformNoel Grandin2016-02-171-1/+1
| | | | | | | | | | | | stage 2 of replacing usage of various checks for the windows platform with the compiler-defined '_WIN32' macro In this stage we focus on replacing usage of the WIN macro Change-Id: Ie8a4a63198a6de96bd158ecd707dadafb9c8ea84 Reviewed-on: https://gerrit.libreoffice.org/22393 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
* loplugin:fpcomparison in opencl/Noel Grandin2016-02-041-1/+2
| | | | | | | Change-Id: Ia5b4a5010afd72ce59629dbc9b2045177a155182 Reviewed-on: https://gerrit.libreoffice.org/21867 Reviewed-by: Noel Grandin <noelgrandin@gmail.com> Tested-by: Noel Grandin <noelgrandin@gmail.com>
* new loplugin: memoryvarNoel Grandin2015-11-112-8/+6
| | | | | | | | | | 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>
* loplugin:nullptr (automatic rewrite; Mac-specific code)Stephan Bergmann2015-11-101-1/+1
| | | | Change-Id: I414c1e7fa1b13d23f15f82d883ab95cf11f09299
* loplugin:nullptr (automatic rewrite)Stephan Bergmann2015-11-103-53/+53
| | | | Change-Id: I60189077f872dd5da3633b15b67b7b7729a75d0d
* clang-analyzer-deadcode.DeadStoresStephan Bergmann2015-10-071-2/+2
| | | | Change-Id: I95404b553f594ced1e2e8b4b8ddf34c08180128f
* loplugin:unusedmethodsNoel Grandin2015-10-011-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>
* loplugin:removeunusedmethods, remove unused stuffNoel Grandin2015-09-291-2/+0
| | | | Change-Id: I35456b2a3ad2a84a1d045f09cdfb29e4c19b8350
* YAGNITor Lillqvist2015-09-161-105/+46
| | | | | | | | We use only one OpenCL device per context or program, so get rid of half-implemented (or half-reverted?) "support" for multiple devices per context. Change-Id: I951f29e867e5b3f96f6e051567ee38d607bd7ecf
* Split formula group for OpenCL up into smaller bits when necessaryTor Lillqvist2015-09-151-0/+5
| | | | | | | | | | | | | | | | | Will make it less demanding on low-end hardware, where the device driver is unresponsive for too long when an OpenCL kernel handling lots of data is executing. This makes Windows restart the driver which is problematic. I tried several approaches of splitting, both at higher levels in sc and at the lowest level just before creating and executing the OpenCL kernel(s). This seems to be the most minimal and local approach. Doing it at the lower level would have required too much poking into our obscure OpenCL code, like passing an offset parameter to every kernel. Use a simple heuristic to find out whether to split. On the problematic low-end devices, CL_DEVICE_PREFERRED_VECTOR_WIDTH_FLOAT is 4, while for more performant devices it is 1 or 8.
* boost->stdCaolán McNamara2015-09-143-8/+6
| | | | | | | | 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>
* Log OpenCL errors symbolically here, tooTor Lillqvist2015-08-261-2/+2
| | | | Change-Id: I96ef317e974a9db1713ad3005d0efcecb2bacda5
* Revert "Enable out-of-order kernel execution"Tor Lillqvist2015-08-261-1/+1
| | | | | | | | | | Is not a good idea after all, says mmeeks. Plus, we should check if the device actually supports it (with clGetDeviceInfo (CL_DEVICE_QUEUE_PROPERTIES) before attempting to use it. This reverts commit a4681be5347fe24867b4f603dc57942c3306227b. Change-Id: I11896ab2d40bd8abcb11a21ce5df4eb75816013a
* Replace boost::scoped_array<T> with std::unique_ptr<T[]>Takeshi Abe2015-06-171-8/+8
| | | | | | | | | | | | | | | | | | | | | | This may reduce some degree of dependency on boost. Done by running a script like: git grep -l '#include *.boost/scoped_array.hpp.' \ | xargs sed -i -e 's@#include *.boost/scoped_array.hpp.@#include <memory>@' git grep -l '\(boost::\)\?scoped_array<\([^<>]*\)>' \ | xargs sed -i -e 's/\(boost::\)\?scoped_array<\([^<>]*\)>/std::unique_ptr<\2[]>/' ... and then killing duplicate or unnecessary includes, while changing manually m_xOutlineStylesCandidates in xmloff/source/text/txtimp.cxx, extensions/source/ole/unoconversionutilities.hxx, and extensions/source/ole/oleobjw.cxx. Change-Id: I3955ed3ad99b94499a7bd0e6e3a09078771f9bfd Reviewed-on: https://gerrit.libreoffice.org/16289 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
* loplugin:cstylecast: deal with remaining pointer castsStephan Bergmann2015-06-081-11/+11
| | | | Change-Id: I1c8cf28803694f81985b9d1c61c62d28158a2f71
* loplugin:cstylecast: deal with those that are (technically) const_castStephan Bergmann2015-06-021-1/+1
| | | | Change-Id: I69193471b9633902d92d0db34b266af52038146a
* Various #include <sal/log.hxx> fixupsStephan Bergmann2015-04-222-0/+2
| | | | | | | | | | | | | | rtl/string.hxx and rtl/ustring.hxx both unnecessarily #include <sal/log.hxx> (and don't make use of it themselves), but many other files happen to depend on it. Cleaned up some, but something like grep -FwL sal/log.hxx $(git grep -Elw \ 'SAL_INFO|SAL_INFO_IF|SAL_WARN|SAL_WARN_IF') -- \*.cxx) shows lots more files that potentially need fixing before the include can be removed from rtl/string.hxx and rtl/ustring.hxx. Change-Id: Ibf033363e83d37851776f392dc0b077381cd8b90
* Clean up C-style casts from pointers to voidStephan Bergmann2015-03-283-22/+22
| | | | Change-Id: I7e6315bf2a2e3d6e089ef8f5eacc69d2b413374a
* Typo: (O/o)veride(n)->(O/o)verride(n)Julien Nabet2015-03-201-1/+1
| | | | Change-Id: Ied81ede9aaf045866596adc40d357cbbddb3d704
* OpenCL: correctly handle platforms without devicesGiuseppe Bilotta2015-03-021-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>
* Add SAL_INFOs for tracing kernel and program life cycleTor Lillqvist2015-02-101-0/+1
| | | | Change-Id: Icb28114d3939063dedaedbd0ce370210b3721fc5
* shared_ptr<T>(new T(args)) -> make_shared<T>(args)Caolán McNamara2015-02-061-1/+1
| | | | | | and boost:make_shared->std::make_shared Change-Id: Ic1e187c52c856a7b27817967b2caa8920f23a98d
* Move OpenCLError::strerror() from sc to opencl, and rename to errorString()Tor Lillqvist2015-02-061-0/+58
| | | | | | | There is nothing Calc-specific in this function, and surely it will be good to output OpenCL errors symbolically also in the opencl module. Change-Id: Ibe7d0d036f24dd87e06b8290224e1033dda0f3d1
* The horrible CHECK_OPENCL() fortunately is used only in openclwrapper.cxxTor Lillqvist2015-02-051-0/+14
| | | | | | | | | So move it there. While at it, make it use SAL_WARN() instead of printf. Also, add a few more SAL_WARN() and SAL_INFO(). Change-Id: Ib058fb20d07757331ca364a8d7649abc59e9494b
* Some more loplugin:cstylecast: openclStephan Bergmann2015-01-201-2/+2
| | | | Change-Id: I93c590a71ea768511a89d6fe17dc7aa01fe73b02
* Fix typo comments Resouce->ResourceAndrea Gelmini2015-01-191-1/+1
| | | | | | | Change-Id: Ia3195a21ad46b4c9830ee6293135dfe5945986a2 Reviewed-on: https://gerrit.libreoffice.org/13985 Reviewed-by: Noel Grandin <noelgrandin@gmail.com> Tested-by: Noel Grandin <noelgrandin@gmail.com>
* Set up foundation for supporting multiple OpenCL command queues per device.Kohei Yoshida2015-01-071-15/+51
| | | | Change-Id: Ia63c8bd6552cdbc2b5eabadaa044b9f1eca5f664
* opencl: Use appropriate OUString functions on string constantsStephan Bergmann2014-12-181-4/+4
| | | | Change-Id: I0c461fa2c2ac62f9dd63e793f8cbc0c68c510082
* Enable out-of-order kernel execution.Kohei Yoshida2014-12-171-1/+1
| | | | Change-Id: I4dbc69ca2618c37184ffdc217493e3880e149617
* Don't treat clew as part of an "external" clcc moduleTor Lillqvist2014-12-082-2/+3
| | | | | | | | | | | | | | | | | | | 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>
* The OpenCLEnv struct is used only inside openclwrapper.cxxTor Lillqvist2014-11-271-0/+8
| | | | Change-Id: I95fbee302213e6ced469dd7a2a1c254178159357
* Clean up confusing OpenCL code a bitTor Lillqvist2014-11-273-71/+67
| | | | | | | | 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
* Need -lrt for clock_gettime() with older glibc versionsTor Lillqvist2014-11-271-0/+6
| | | | Change-Id: I4651f74a89b8707cbf0ebdd3b950df3a5b99177a
* Use correct SAL_INFO log areaTor Lillqvist2014-11-271-2/+2
| | | | Change-Id: I47e6dcf18fe141b8dba33a8c3cd83f80950045cd
* Move more Calc-independent OpenCL stuff from the sc to the opencl moduleTor Lillqvist2014-11-275-0/+2075
| | | | | | | | | | 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
* Add a README fileTor Lillqvist2014-11-271-0/+7
| | | | Change-Id: Id0f8a146ca90efe6f84c7a0c377ad3f83ba7da8d
* Work in progress: Move Calc-independend OpenCL configuration out of scTor Lillqvist2014-11-275-0/+374
Intermediate commit. More changes will follow: The device selection logic needs to be moved, too. (And cleaned up.) Instead of the separate formulacalculationoptions dialog we should simply have a normal options page for those OpenCL-related settings that will remain purely Calc-specific, like the formula opcode subsetting. Change-Id: Id60d95e80d377cbbf5780beb473b221bce06b5e5