Commit 3ebec744 authored by Vladislav Vinogradov's avatar Vladislav Vinogradov

minor refactoring:

moved lbp.hpp to src/cuda folder
added missing cv::gpu::device namespace
deleted whitespaces
parent a703df54
...@@ -42,9 +42,9 @@ ...@@ -42,9 +42,9 @@
#if !defined CUDA_DISABLER #if !defined CUDA_DISABLER
#include <opencv2/gpu/device/lbp.hpp> #include "lbp.hpp"
#include <opencv2/gpu/device/vec_traits.hpp> #include "opencv2/gpu/device/vec_traits.hpp"
#include <opencv2/gpu/device/saturate_cast.hpp> #include "opencv2/gpu/device/saturate_cast.hpp"
namespace cv { namespace gpu { namespace device namespace cv { namespace gpu { namespace device
{ {
......
...@@ -1535,6 +1535,8 @@ namespace cv { namespace gpu { namespace device ...@@ -1535,6 +1535,8 @@ namespace cv { namespace gpu { namespace device
return functor_type(); \ return functor_type(); \
} \ } \
}; };
#undef CV_DESCALE
}}} // namespace cv { namespace gpu { namespace device }}} // namespace cv { namespace gpu { namespace device
#endif // __OPENCV_GPU_COLOR_DETAIL_HPP__ #endif // __OPENCV_GPU_COLOR_DETAIL_HPP__
...@@ -40,15 +40,15 @@ ...@@ -40,15 +40,15 @@
// //
//M*/ //M*/
#ifndef __OPENCV_GPU_UTILITY_DETAIL_HPP__ #ifndef __OPENCV_GPU_REDUCTION_DETAIL_HPP__
#define __OPENCV_GPU_UTILITY_DETAIL_HPP__ #define __OPENCV_GPU_REDUCTION_DETAIL_HPP__
namespace cv { namespace gpu { namespace device namespace cv { namespace gpu { namespace device
{ {
namespace utility_detail namespace utility_detail
{ {
/////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////
// Reduction // Reductor
template <int n> struct WarpReductor template <int n> struct WarpReductor
{ {
...@@ -838,4 +838,4 @@ namespace cv { namespace gpu { namespace device ...@@ -838,4 +838,4 @@ namespace cv { namespace gpu { namespace device
} // namespace utility_detail } // namespace utility_detail
}}} // namespace cv { namespace gpu { namespace device }}} // namespace cv { namespace gpu { namespace device
#endif // __OPENCV_GPU_UTILITY_DETAIL_HPP__ #endif // __OPENCV_GPU_REDUCTION_DETAIL_HPP__
...@@ -203,7 +203,7 @@ namespace cv { namespace gpu { namespace device ...@@ -203,7 +203,7 @@ namespace cv { namespace gpu { namespace device
}; };
template <typename T, typename D, typename UnOp, typename Mask> template <typename T, typename D, typename UnOp, typename Mask>
__global__ static void transformSmart(const PtrStepSz<T> src_, PtrStep<D> dst_, const Mask mask, const UnOp op) static __global__ void transformSmart(const PtrStepSz<T> src_, PtrStep<D> dst_, const Mask mask, const UnOp op)
{ {
typedef TransformFunctorTraits<UnOp> ft; typedef TransformFunctorTraits<UnOp> ft;
typedef typename UnaryReadWriteTraits<T, D, ft::smart_shift>::read_type read_type; typedef typename UnaryReadWriteTraits<T, D, ft::smart_shift>::read_type read_type;
...@@ -239,7 +239,7 @@ namespace cv { namespace gpu { namespace device ...@@ -239,7 +239,7 @@ namespace cv { namespace gpu { namespace device
} }
template <typename T, typename D, typename UnOp, typename Mask> template <typename T, typename D, typename UnOp, typename Mask>
static __global__ void transformSimple(const PtrStepSz<T> src, PtrStep<D> dst, const Mask mask, const UnOp op) __global__ static void transformSimple(const PtrStepSz<T> src, PtrStep<D> dst, const Mask mask, const UnOp op)
{ {
const int x = blockDim.x * blockIdx.x + threadIdx.x; const int x = blockDim.x * blockIdx.x + threadIdx.x;
const int y = blockDim.y * blockIdx.y + threadIdx.y; const int y = blockDim.y * blockIdx.y + threadIdx.y;
...@@ -251,7 +251,7 @@ namespace cv { namespace gpu { namespace device ...@@ -251,7 +251,7 @@ namespace cv { namespace gpu { namespace device
} }
template <typename T1, typename T2, typename D, typename BinOp, typename Mask> template <typename T1, typename T2, typename D, typename BinOp, typename Mask>
__global__ static void transformSmart(const PtrStepSz<T1> src1_, const PtrStep<T2> src2_, PtrStep<D> dst_, static __global__ void transformSmart(const PtrStepSz<T1> src1_, const PtrStep<T2> src2_, PtrStep<D> dst_,
const Mask mask, const BinOp op) const Mask mask, const BinOp op)
{ {
typedef TransformFunctorTraits<BinOp> ft; typedef TransformFunctorTraits<BinOp> ft;
......
...@@ -43,6 +43,10 @@ ...@@ -43,6 +43,10 @@
#ifndef __OPENCV_GPU_SCAN_HPP__ #ifndef __OPENCV_GPU_SCAN_HPP__
#define __OPENCV_GPU_SCAN_HPP__ #define __OPENCV_GPU_SCAN_HPP__
#include "common.hpp"
namespace cv { namespace gpu { namespace device
{
enum ScanKind { EXCLUSIVE = 0, INCLUSIVE = 1 }; enum ScanKind { EXCLUSIVE = 0, INCLUSIVE = 1 };
template <ScanKind Kind, typename T, typename F> struct WarpScan template <ScanKind Kind, typename T, typename F> struct WarpScan
...@@ -162,5 +166,6 @@ ...@@ -162,5 +166,6 @@
static const int warp_log = 5; static const int warp_log = 5;
static const int warp_mask = 31; static const int warp_mask = 31;
}; };
}}}
#endif #endif // __OPENCV_GPU_SCAN_HPP__
\ No newline at end of file
...@@ -60,8 +60,6 @@ namespace cv { namespace gpu ...@@ -60,8 +60,6 @@ namespace cv { namespace gpu
__OPENCV_GPU_HOST_DEVICE__ static void check() {}; __OPENCV_GPU_HOST_DEVICE__ static void check() {};
}; };
} }
using ::cv::gpu::device::Static;
}} }}
#undef __OPENCV_GPU_HOST_DEVICE__ #undef __OPENCV_GPU_HOST_DEVICE__
......
...@@ -45,7 +45,7 @@ ...@@ -45,7 +45,7 @@
#include "saturate_cast.hpp" #include "saturate_cast.hpp"
#include "datamov_utils.hpp" #include "datamov_utils.hpp"
#include "detail/utility_detail.hpp" #include "detail/reduction_detail.hpp"
namespace cv { namespace gpu { namespace device namespace cv { namespace gpu { namespace device
{ {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment