Bug 76290

Summary: use OpenMP for image algorithms
Product: LibreOffice Reporter: Markus Mohrhard <markus.mohrhard>
Component: LibreofficeAssignee: Not Assigned <libreoffice-bugs>
Status: NEW --- QA Contact:
Severity: normal    
Priority: medium CC: libreoffice
Version: unspecified   
Hardware: Other   
OS: All   
Whiteboard: EasyHack DifficultyInteresting SkillCpp TopicCleanup
i915 platform: i915 features:

Description Markus Mohrhard 2014-03-17 19:58:18 UTC
The image algorithms in vcl/source/gdi/bitmap3.cxx are perfect examples for algorithms that benefit from parallel execution.

The task is to go through each function identify the parallel sections and check that the memory access allows parallel execution (no overlapping read/write in the same memory, no overlapping writes in the same memory, ...) and use OpenMP to make the code use more cores in modern processors.

This also requires some makefile changes to support compiling files with OpenMP enabled.
Comment 1 Markus Mohrhard 2014-03-17 20:00:33 UTC
Making it an Easy Hack.
Comment 2 Tor Lillqvist 2014-03-17 20:02:40 UTC
I guess it should be pointed out that the use of OpenMP should be optional, or is that obvious?
Comment 3 Markus Mohrhard 2014-03-17 20:05:37 UTC
(In reply to comment #2)
> I guess it should be pointed out that the use of OpenMP should be optional,
> or is that obvious?

OpenMP is supported by all our compilers but in general that is not a big problem as OpenMP contains just some compiler directives that are ignored by compilers that don't understand them.
Comment 4 Tor Lillqvist 2014-03-17 20:11:16 UTC
It is not supported in Clang for iOS, as far as I know.
Comment 5 Tor Lillqvist 2014-03-17 20:12:40 UTC
And actually I think Clang doesn't support OpenMP when compiling for OS X either (if at all). But yeah, it shouldn't be hard to check.
Comment 6 Markus Mohrhard 2014-03-17 20:18:49 UTC
According to http://openmp.llvm.org/ it seems to be supported nowadays but in the end as it is not code it does not matter too much. If a compiler does not support OpenMP it will just ignore the directives and not generate parallel code and fall back to the sequential version.
Comment 7 Tor Lillqvist 2014-03-17 20:20:55 UTC
That is some branch of Clang you have to build yourself, not the Clang in the Xcode product from Apple.

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.