Fix dependencies on config.h for typedefs.h
[alexxy/gromacs.git] / src / gromacs / utility / gmxomp.h
index c698b5168ac11fce1c9caddf58af10568f577caa..af11cac918acdcc739daba306f3a41e8865c0f1a 100644 (file)
@@ -53,6 +53,7 @@
 #include "config.h"
 #endif
 
+#ifndef GMX_NATIVE_WINDOWS
 /* Ugly hack because the openmp implementation below hacks into the SIMD
  * settings to decide when to use _mm_pause(). This should eventually be
  * changed into proper detection of the intrinsics uses, not SIMD.
@@ -62,6 +63,9 @@
     (defined GMX_SIMD_X86_AVX2_256)
 #    include <xmmintrin.h>
 #endif
+#else
+#include <windows.h>
+#endif
 
 #include "types/commrec.h"
 #include "mdrun.h"
@@ -118,6 +122,7 @@ void gmx_omp_check_thread_affinity(FILE *fplog, const t_commrec *cr,
  */
 static gmx_inline void gmx_pause()
 {
+#ifndef GMX_NATIVE_WINDOWS
     /* Ugly hack because the openmp implementation below hacks into the SIMD
      * settings to decide when to use _mm_pause(). This should eventually be
      * changed into proper detection of the intrinsics uses, not SIMD.
@@ -132,6 +137,9 @@ static gmx_inline void gmx_pause()
 #else
     /* No wait for unknown architecture */
 #endif
+#else
+    YieldProcessor();
+#endif
 }
 
 /*! \} */