summaryrefslogtreecommitdiff
path: root/opencl/source
AgeCommit message (Collapse)AuthorFilesLines
2015-11-11new loplugin: memoryvarNoel Grandin2-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>
2015-11-10loplugin:nullptr (automatic rewrite; Mac-specific code)Stephan Bergmann1-1/+1
Change-Id: I414c1e7fa1b13d23f15f82d883ab95cf11f09299
2015-11-10loplugin:nullptr (automatic rewrite)Stephan Bergmann3-53/+53
Change-Id: I60189077f872dd5da3633b15b67b7b7729a75d0d
2015-10-07clang-analyzer-deadcode.DeadStoresStephan Bergmann1-2/+2
Change-Id: I95404b553f594ced1e2e8b4b8ddf34c08180128f
2015-09-16YAGNITor Lillqvist1-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
2015-09-15Split formula group for OpenCL up into smaller bits when necessaryTor Lillqvist1-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.
2015-09-14boost->stdCaolán McNamara3-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>
2015-08-26Log OpenCL errors symbolically here, tooTor Lillqvist1-2/+2
Change-Id: I96ef317e974a9db1713ad3005d0efcecb2bacda5
2015-08-26Revert "Enable out-of-order kernel execution"Tor Lillqvist1-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
2015-06-17Replace boost::scoped_array<T> with std::unique_ptr<T[]>Takeshi Abe1-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>
2015-06-08loplugin:cstylecast: deal with remaining pointer castsStephan Bergmann1-11/+11
Change-Id: I1c8cf28803694f81985b9d1c61c62d28158a2f71
2015-06-02loplugin:cstylecast: deal with those that are (technically) const_castStephan Bergmann1-1/+1
Change-Id: I69193471b9633902d92d0db34b266af52038146a
2015-04-22Various #include <sal/log.hxx> fixupsStephan Bergmann2-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
2015-03-28Clean up C-style casts from pointers to voidStephan Bergmann2-15/+15
Change-Id: I7e6315bf2a2e3d6e089ef8f5eacc69d2b413374a
2015-03-20Typo: (O/o)veride(n)->(O/o)verride(n)Julien Nabet1-1/+1
Change-Id: Ied81ede9aaf045866596adc40d357cbbddb3d704
2015-02-10Add SAL_INFOs for tracing kernel and program life cycleTor Lillqvist1-0/+1
Change-Id: Icb28114d3939063dedaedbd0ce370210b3721fc5
2015-02-06shared_ptr<T>(new T(args)) -> make_shared<T>(args)Caolán McNamara1-1/+1
and boost:make_shared->std::make_shared Change-Id: Ic1e187c52c856a7b27817967b2caa8920f23a98d
2015-02-06Move OpenCLError::strerror() from sc to opencl, and rename to errorString()Tor Lillqvist1-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
2015-02-05The horrible CHECK_OPENCL() fortunately is used only in openclwrapper.cxxTor Lillqvist1-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
2015-01-19Fix typo comments Resouce->ResourceAndrea Gelmini1-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>
2015-01-07Set up foundation for supporting multiple OpenCL command queues per device.Kohei Yoshida1-15/+51
Change-Id: Ia63c8bd6552cdbc2b5eabadaa044b9f1eca5f664
2014-12-18opencl: Use appropriate OUString functions on string constantsStephan Bergmann1-4/+4
Change-Id: I0c461fa2c2ac62f9dd63e793f8cbc0c68c510082
2014-12-17Enable out-of-order kernel execution.Kohei Yoshida1-1/+1
Change-Id: I4dbc69ca2618c37184ffdc217493e3880e149617
2014-11-27The OpenCLEnv struct is used only inside openclwrapper.cxxTor Lillqvist1-0/+8
Change-Id: I95fbee302213e6ced469dd7a2a1c254178159357
2014-11-27Clean up confusing OpenCL code a bitTor Lillqvist2-70/+66
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-27Use correct SAL_INFO log areaTor Lillqvist1-2/+2
Change-Id: I47e6dcf18fe141b8dba33a8c3cd83f80950045cd
2014-11-27Move more Calc-independent OpenCL stuff from the sc to the opencl moduleTor Lillqvist2-0/+1402
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
2014-11-27Work in progress: Move Calc-independend OpenCL configuration out of scTor Lillqvist2-0/+302
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