diff --git a/modules/gpu/src/cuda/internal_shared.hpp b/modules/gpu/src/cuda/internal_shared.hpp index 7c27675bec..2b52dbbe5b 100644 --- a/modules/gpu/src/cuda/internal_shared.hpp +++ b/modules/gpu/src/cuda/internal_shared.hpp @@ -66,6 +66,8 @@ #define OPENCV_DEVICE_NAMESPACE ::cv::gpu::device #define OPENCV_DEVICE_NAMESPACE_ ::cv::gpu::device:: +#ifdef __CUDACC__ + BEGIN_OPENCV_DEVICE_NAMESPACE typedef unsigned char uchar; @@ -81,6 +83,8 @@ template static inline void bindTexture(const textureReference* tex, co END_OPENCV_DEVICE_NAMESPACE +#endif + namespace cv { namespace gpu { enum diff --git a/modules/gpu/src/stereobm.cpp b/modules/gpu/src/stereobm.cpp index 974b3dc2e8..a23c9144fd 100644 --- a/modules/gpu/src/stereobm.cpp +++ b/modules/gpu/src/stereobm.cpp @@ -59,7 +59,7 @@ BEGIN_OPENCV_DEVICE_NAMESPACE namespace stereobm { - void stereoBM_GPU(const DevMem2Db& left, const DevMem2Db& right, const DevMem2Db& disp, int ndisp, int winsz, const DevMem2D_& minSSD_buf, cudaStream_t & stream); + void stereoBM_GPU(const DevMem2Db& left, const DevMem2Db& right, const DevMem2Db& disp, int ndisp, int winsz, const DevMem2D_& minSSD_buf, cudaStream_t & stream); void prefilter_xsobel(const DevMem2Db& input, const DevMem2Db& output, int prefilterCap /*= 31*/, cudaStream_t & stream); void postfilter_textureness(const DevMem2Db& input, int winsz, float avgTexturenessThreshold, const DevMem2Db& disp, cudaStream_t & stream); } diff --git a/modules/gpu/src/surf.cpp b/modules/gpu/src/surf.cpp index 35128448d9..9d2d37f8a6 100644 --- a/modules/gpu/src/surf.cpp +++ b/modules/gpu/src/surf.cpp @@ -71,8 +71,8 @@ namespace surf void loadOctaveConstants(int octave, int layer_rows, int layer_cols); void bindImgTex(DevMem2Db img); - void bindSumTex(DevMem2D_ sum); - void bindMaskSumTex(DevMem2D_ maskSum); + void bindSumTex(DevMem2D_ sum); + void bindMaskSumTex(DevMem2D_ maskSum); void icvCalcLayerDetAndTrace_gpu(const PtrStepf& det, const PtrStepf& trace, int img_rows, int img_cols, int octave, int nOctaveLayers);