[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
- Re: Enabling OpenMP by default, c., 2013/03/11
- Re: Enabling OpenMP by default, Júlio Hoffimann, 2013/03/11
- Re: Enabling OpenMP by default, Susi Lehtola, 2013/03/12
- Re: Enabling OpenMP by default, Júlio Hoffimann, 2013/03/12
- Re: Enabling OpenMP by default, Thomas Weber, 2013/03/18
- Re: Enabling OpenMP by default, Júlio Hoffimann, 2013/03/19
- Re: Enabling OpenMP by default, Jordi Gutiérrez Hermoso, 2013/03/20
- Re: Enabling OpenMP by default, Júlio Hoffimann, 2013/03/20
Re: Enabling OpenMP by default, Thomas Weber, 2013/03/18