octave-maintainers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Enabling OpenMP by default


From: Susi Lehtola
Subject: Re: Enabling OpenMP by default
Date: Mon, 11 Mar 2013 02:14:58 +0200

On Sun, 10 Mar 2013 17:50:05 -0300
Júlio Hoffimann <address@hidden> wrote:
> For every occurrence (239 so far) of a parallel region we ideally
> want the pragma to be wrapped by a #ifdef directive (e.g. #if
> defined(_OPENMP) ... #endif), but this would cause an unacceptable
> decrease in readability since 239*3 = 717 new lines of boilerplate.
> The number of regions is that high because the array classes don't
> satisfy the DRY principle, and probably can't.

This is just a thought, but if you want to avoid a lot of #ifdef's,
then maybe you could just #define some pragmas to be used inside
Octave, e.g.

#ifdef _OPENMP
#pragma omp parallel for
#endif

could be just e.g.

#octave_omp_parfor

and this macro could be defined to be empty if OpenMP is disabled...
-- 
Susi Lehtola
Fedora Project Contributor
address@hidden


reply via email to

[Prev in Thread] Current Thread [Next in Thread]