File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 5555/* --- The generic start of OpenMP constructs. ---*/
5656#define SU2_OMP (ARGS ) PRAGMIZE(omp ARGS)
5757
58+ /* --- Detect SIMD support (version 4+, after Jul 2013). ---*/
59+ #if _OPENMP >= 201307
60+ #define HAVE_OMP_SIMD
61+ #endif
62+
5863#else // Compile without OpenMP
5964
6065/* --- Disable pragmas to quiet compilation warnings. ---*/
@@ -110,8 +115,8 @@ inline void omp_destroy_lock(omp_lock_t*){}
110115#define SU2_OMP_FOR_DYN (CHUNK ) SU2_OMP(for schedule (dynamic,CHUNK))
111116#define SU2_OMP_FOR_STAT (CHUNK ) SU2_OMP(for schedule (static ,CHUNK))
112117
113- /* --- Disable some unsupported features on MSVC . ---*/
114- #if defined(_MSC_VER)
118+ /* --- Disable some unsupported features. ---*/
119+ #ifndef HAVE_OMP_SIMD
115120#undef SU2_OMP_SIMD
116121#define SU2_OMP_SIMD
117122#endif
Original file line number Diff line number Diff line change 4040 * CSysVector and do not have the same work scheduling must use a
4141 * SU2_OMP_BARRIER before using the vector.
4242 */
43- #ifndef _MSC_VER
43+ #ifdef HAVE_OMP_SIMD
4444#define PARALLEL_FOR SU2_OMP (for simd schedule (static ,omp_chunk_size) nowait)
4545#else
46- /* --- MSVC does not support SIMD by default. ---*/
4746#define PARALLEL_FOR SU2_OMP (for schedule (static ,omp_chunk_size) nowait)
4847#endif
4948
You can’t perform that action at this time.
0 commit comments