Bug 76290 - use OpenMP for image algorithms
Summary: use OpenMP for image algorithms
Status: RESOLVED INVALID
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: LibreOffice (show other bugs)
Version:
(earliest affected)
unspecified
Hardware: Other All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: difficultyInteresting, easyHack, skillCpp, topicCleanup
Depends on:
Blocks:
 
Reported: 2014-03-17 19:58 UTC by Markus Mohrhard
Modified: 2017-02-14 08:58 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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 How can I remove my account? 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 How can I remove my account? 2014-03-17 20:11:16 UTC
It is not supported in Clang for iOS, as far as I know.
Comment 5 How can I remove my account? 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 How can I remove my account? 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.
Comment 8 Robinson Tryon (qubit) 2015-12-14 05:01:17 UTC Comment hidden (obsolete)
Comment 9 Robinson Tryon (qubit) 2016-02-18 14:52:37 UTC Comment hidden (obsolete)
Comment 10 Markus Mohrhard 2016-04-18 08:00:50 UTC
Most likely a bad idea.