[XviD-devel] Re: OpenMP parallelization

Christoph Lampert chl at math.uni-bonn.de
Sun Feb 9 22:48:52 CET 2003


On Sun, 9 Feb 2003, Felix von Leitner wrote:

> Thus spake Christoph Lampert (chl at math.uni-bonn.de):
> > what would you think of OpenMP parallelism instead of
> > pthread-Multithreading?
> 
> Why "instead of"?  Is there reason to believe that openmp could scale
> better than the pthread stuff?

No, but pthread stuff requires big modifications and make the source either
completely unreadable code or needs a double code basis for SMP and
non-SMP. 

OpenMP would only be a few pragmas at crucial positions. I don't expect
linear speedup, but on SMP it might help in heavy calculation routines
which are still C-only, like GMC. 


> > Does VisualC++ suport this (yeah, I know, of course not).
> > There is something call Omni OpenMP for cygwin and other projects, I never
> > heard of.
> 
> > icc for Linux does support openMP, so maybe Windows version does, too. 
> > And there might be some modification of gcc that does, but I didn't find
> > it.
> 
> Just a few days ago, a gcc cvs branch was created for openmp, but AFAIK
> no actual code is in it yet.
> 
> I'm not involved, I just saw it on the mailing list.
> 
> > For those who haven't met openMP: It's a "trick" to tell the compiler
> > which parts of a program can be multithreaded by  #pragma  's in the code.
> > If the compiler doesn't know about openMP, it ignores the statements.
> 
> I wonder how this can me more efficient than pthread on any CPU you can
> buy today.  

I'm pretty sure that it isn't more efficient. But it's simpler to do,
because you don't have to deal with all the semaphores and mutex stuff. 

gruel 




More information about the XviD-devel mailing list