Skip to content

Commit 1c49796

Browse files
committed
guad for CUDA correctly
1 parent 432d0fd commit 1c49796

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

modules/core/include/opencv2/core/cv_cpu_dispatch.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -121,8 +121,8 @@ struct VZeroUpperGuard {
121121

122122

123123

124-
#if !defined __OPENCV_BUILD // Compatibility code
125-
124+
#if !defined __OPENCV_BUILD /* Compatibility code */ \
125+
&& !defined __CUDACC__ /* do not include SSE/AVX/NEON headers for NVCC compiler */
126126
#if defined __SSE2__ || defined _M_X64 || (defined _M_IX86_FP && _M_IX86_FP >= 2)
127127
# include <emmintrin.h>
128128
# define CV_MMX 1
@@ -137,7 +137,7 @@ struct VZeroUpperGuard {
137137
# define CV_NEON 1
138138
#endif
139139

140-
#endif // !__OPENCV_BUILD (Compatibility code)
140+
#endif // !__OPENCV_BUILD && !__CUDACC (Compatibility code)
141141

142142

143143

0 commit comments

Comments
 (0)