OpenMP and krita

Boudewijn Rempt boud at valdyas.org
Thu May 17 16:20:15 CEST 2007


On Wednesday 16 May 2007, Cyrille Berger wrote:
> Hello,
>
> With the recently released gcc 4.2, comes support for OpenMP
> (http://en.wikipedia.org/wiki/OpenMP) which allow to easily add
> multithreading computation.

Nice! Progress!

> Compared to ThreadWeaver, the main advantage is that it is much more easier
> to multithread a loop (just add a line #pragma omp parallel for) then
> ThreadWeaver has the advantage that it gives you much more controls on your
> threads, error handling and it doesn't need gcc 4.2 :)
>
> That said an interesting place to use OpenMP I think might be some simple
> loop we have like in the composite op.
> We might have to rewrite them from
> while(nbpixel > 0)
> {
>  *it=smthg;
>  ++it;
>  --nbpixel;
> }
> to
> for(i = 0 to nbpixel)
> {
>  it[i] = smthg;
> }
>
> It might be interesting to see if that brings something when gcc 4.2 is
> more widely available :)

Yes, that should be cool. Does OpenMP also use MMX and similar where possible? 
Because that's where I see the biggest benefit for compositing. 

-- 
Boudewijn Rempt 
http://www.valdyas.org/fading/index.cgi
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://mail.kde.org/pipermail/kimageshop/attachments/20070517/4749c901/attachment.pgp 


More information about the kimageshop mailing list