rework handling of empty cells in opencl code

Desktop / LibreOffice - Luboš Luňák [collabora.com] - 21 September 2022 08:22 UTC

Some of the code handling ranges of cells wants empty cells to be zero, some wants to skip them, and few want special handling. So just make three generic cases that handle these, which somewhat simplifies this while still allowing flexibility where needed. Also handle better Test::testFuncSUMXMY2, which works on a pair of ranges, sets a cell in one to a value and another is empty, in this case it is necessary to iterate over this pair with SkipEmpty even if for the second one it's beyond GetArrayLength().

Change-Id: I6c8edaaadb02ffe2a6a7a9399347909008ea188e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140249

33f242266138 rework handling of empty cells in opencl code
sc/source/core/opencl/op_array.cxx | 15 +-
sc/source/core/opencl/op_financial.cxx | 83 ++++-----
sc/source/core/opencl/op_logical.cxx | 22 ++-
sc/source/core/opencl/op_logical.hxx | 10 +-
sc/source/core/opencl/op_math.cxx | 23 +--
sc/source/core/opencl/op_statistical.cxx | 308 +++++++++++--------------------
sc/source/core/opencl/opbase.cxx | 137 +++++++++++---
sc/source/core/opencl/opbase.hxx | 44 +++--
8 files changed, 317 insertions(+), 325 deletions(-)

Upstream: cgit.freedesktop.org


  • Share