GetImageChannelDepth parallel patch

Questions and postings pertaining to the development of ImageMagick, feature enhancements, and ImageMagick internals. ImageMagick source code and algorithms are discussed here. Usage questions which are too arcane for the normal user list should also be posted here.
Post Reply
cmvieira

GetImageChannelDepth parallel patch

Post by cmvieira »

Hello,
I've edited the statistic.c source file, more specifically the GetImageChannelDepth function, providing a multithreaded version for this function (using OpenMP). Verifying the improvement of performance, I've noticed a speedup of up to 3.6 times on a quad-core machine, just using the tests that are included in the "make check" test cases.

http://rapidshare.com/files/113480058/s ... patch.html
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: GetImageChannelDepth parallel patch

Post by magick »

Excellant. Thanks for the patch. We'll get it into ImageMagick 6.4.1-2 Beta by sometime tomorrow.
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: GetImageChannelDepth parallel patch

Post by magick »

We had to patch your patch. AcquireImagePixels() is not thread safe. We used a cache view instead. See http://www.imagemagick.org/script/archi ... hp#threads for a discussion.
cmvieira

Re: GetImageChannelDepth parallel patch

Post by cmvieira »

Ok,
Sorry for this bug
and thanks for reviewing the patch. :)
Post Reply