|
|
Vincent Le Chevalier <gal### [at] libertyallsurfspamfr> wrote:
> Darren New wrote:
> >> Line 79 means each row of pixels is computed in parallel, right?
> >
> > Got me. It looks like someone is asking the compiler to do that if it can.
> >
> It's using the OpenMP directives
> (http://en.wikipedia.org/wiki/OpenMP)... I discovered that last year,
> can be pretty useful and makes it quite easy to take advantage of
> multiple cores when the algorithms are already mostly suited to being
> run in parallel.
The advantage of OpenMP is that the routine will run in parallel if
the compiler supports it, but if the compiler doesn't support OpenMP,
it doesn't matter: The program will still compile and work properly
(it will just be single-threaded). Compilers ignore #pragmas they don't
recognize (per the standard), so the addition #pragma openmp's don't
matter.
--
- Warp
Post a reply to this message
|
|