diff --git a/.LATEST_P4_CHANGELIST b/.LATEST_P4_CHANGELIST index a293c976f..c9b35dfb1 100644 --- a/.LATEST_P4_CHANGELIST +++ b/.LATEST_P4_CHANGELIST @@ -1,7 +1 @@ ---- .LATEST_P4_CHANGELIST -+++ .LATEST_P4_CHANGELIST -@@ -1,1 +1,1 @@ --11016751 -\ No newline at end of file -+11046532 -\ No newline at end of file +11080642 diff --git a/thrust/detail/config/compiler_fence.h b/thrust/detail/config/compiler_fence.h index 214ab0d46..0d9550115 100644 --- a/thrust/detail/config/compiler_fence.h +++ b/thrust/detail/config/compiler_fence.h @@ -21,9 +21,16 @@ // msvc case #if THRUST_HOST_COMPILER == THRUST_HOST_COMPILER_MSVC +#ifndef _DEBUG + #include #pragma intrinsic(_ReadWriteBarrier) #define __thrust_compiler_fence() _ReadWriteBarrier() +#else + +#define __thrust_compiler_fence() do {} while (0) + +#endif // _DEBUG // gcc case #elif THRUST_HOST_COMPILER == THRUST_HOST_COMPILER_GCC @@ -35,7 +42,7 @@ #define __thrust_compiler_fence() __sync_synchronize() #else // allow the code to compile without any guarantees -#define __thrust_compiler_fence() +#define __thrust_compiler_fence() do {} while (0) #endif // THRUST_GCC_VERSION // clean up after ourselves @@ -45,7 +52,7 @@ #elif THRUST_HOST_COMPILER == THRUST_HOST_COMPILER_UNKNOWN // allow the code to compile without any guarantees -#define __thrust_compiler_fence() +#define __thrust_compiler_fence() do {} while (0) #endif