Page 1 of 1

GetImageChannelDepth parallel patch

Posted: 2008-05-08T10:12:06-07:00
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

Re: GetImageChannelDepth parallel patch

Posted: 2008-05-08T10:18:16-07:00
by magick
Excellant. Thanks for the patch. We'll get it into ImageMagick 6.4.1-2 Beta by sometime tomorrow.

Re: GetImageChannelDepth parallel patch

Posted: 2008-05-08T10:49:34-07:00
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.

Re: GetImageChannelDepth parallel patch

Posted: 2008-05-09T13:41:07-07:00
by cmvieira
Ok,
Sorry for this bug
and thanks for reviewing the patch. :)