From: Giovanni Piero Deretta (gpderetta_at_[hidden])
Date: 2008-04-02 17:59:40
On Wed, Apr 2, 2008 at 11:37 PM, Stephen Nuchia <snuchia_at_[hidden]> wrote:
> > Does #ifdef around #pragma omp indeed work? At least
> > #define PARALLEL #pragma omp
> > and using PARALLEL does not work.
> I think the above may clash with either the definition or an
> implementation of #pragma; I can't recall ever successfully using a
> macro that expands to any directive. But that could be because I
> haven't tried it in the last twenty years :-)
I do not think that there is any way for a macro to expand to a directive.
Except that C99 has _Pragma that can be used in macros. I do not know
how many c++ compilers support it nor
if it actually works with OpenMP.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk