https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80502

--- Comment #4 from Eric Gallager <egallager at gcc dot gnu.org> ---
(In reply to Evan Nemerson from comment #3)
> (In reply to Jakub Jelinek from comment #2)
> > _OPENMP_SIMD is a bad idea, that namespace is reserved for OpenMP, so unless
> > it shows up in the OpenMP standard, it shouldn't be added.
> 
> Fair enough, I'll propose it to the OpenMP people:
> http://forum.openmp.org/forum/viewtopic.php?f=23&t=2031
> 
> > Why do you need a macro?  Just use #pragma omp simd etc. unconditionally,
> > compilers that don't have support for such pragmas will just ignore those.
> 
> Not necessarily; often they'll emit warnings (for GCC, -Wall even includes
> -Wunknown-pragmas). I'd much rather use the preprocessor in my code than
> teach people to disable warnings.
> 

Does Michael Klemm from that discussion have an account here on this bugzilla?

> I need to support alternatives in my code. For example, for SIMDe
> (<https://github.com/nemequ/simde>), I try to support OpenMP SIMD and Cilk
> Plus, as well as compiler-specific pragmas for GCC (GCC ivdep), ICC (simd),
> and clang (clang loop ...), and I'd be happy to add more as necessary. I'd
> rather not end up with something like
> 
>   #pragma omp simd
>   #pragma simd
>   #pragma GCC ivdep
>   #pragma clang loop vectorize(enable)
>   for (...) { ... }
> 
> I'd much rather just have a few macros which will expand to the right pragma
> based on preprocessor macros. Right now I'm stuck using the much less
> expressive ivdep syntax for GCC unless *full* OpenMP support is enabled (or
> someone defines a macro manually to indicate OpenMP SIMD support).

Reply via email to