renamed gpu namespace -> cuda

This commit is contained in:
Vladislav Vinogradov
2013-08-28 15:45:13 +04:00
parent e12496d150
commit e895b7455e
343 changed files with 3882 additions and 3882 deletions

View File

@@ -490,7 +490,7 @@ namespace ogl
class CV_EXPORTS Arrays;
}
namespace gpu
namespace cuda
{
class CV_EXPORTS GpuMat;
class CV_EXPORTS CudaMem;

View File

@@ -43,7 +43,7 @@
#ifndef __OPENCV_GPU_DEVICE_BLOCK_HPP__
#define __OPENCV_GPU_DEVICE_BLOCK_HPP__
namespace cv { namespace gpu { namespace cudev
namespace cv { namespace cuda { namespace cudev
{
struct Block
{

View File

@@ -47,7 +47,7 @@
#include "vec_traits.hpp"
#include "vec_math.hpp"
namespace cv { namespace gpu { namespace cudev
namespace cv { namespace cuda { namespace cudev
{
//////////////////////////////////////////////////////////////
// BrdConstant
@@ -709,6 +709,6 @@ namespace cv { namespace gpu { namespace cudev
int width;
D val;
};
}}} // namespace cv { namespace gpu { namespace cudev
}}} // namespace cv { namespace cuda { namespace cudev
#endif // __OPENCV_GPU_BORDER_INTERPOLATE_HPP__

View File

@@ -45,7 +45,7 @@
#include "detail/color_detail.hpp"
namespace cv { namespace gpu { namespace cudev
namespace cv { namespace cuda { namespace cudev
{
// All OPENCV_GPU_IMPLEMENT_*_TRAITS(ColorSpace1_to_ColorSpace2, ...) macros implements
// template <typename T> class ColorSpace1_to_ColorSpace2_traits
@@ -296,6 +296,6 @@ namespace cv { namespace gpu { namespace cudev
OPENCV_GPU_IMPLEMENT_Luv2RGB_TRAITS(luv4_to_lbgra, 4, 4, false, 0)
#undef OPENCV_GPU_IMPLEMENT_Luv2RGB_TRAITS
}}} // namespace cv { namespace gpu { namespace cudev
}}} // namespace cv { namespace cuda { namespace cudev
#endif // __OPENCV_GPU_BORDER_INTERPOLATE_HPP__

View File

@@ -56,7 +56,7 @@
#endif
#endif
namespace cv { namespace gpu {
namespace cv { namespace cuda {
static inline void checkCudaError(cudaError_t err, const char* file, const int line, const char* func)
{
if (cudaSuccess != err)
@@ -66,13 +66,13 @@ namespace cv { namespace gpu {
#ifndef cudaSafeCall
#if defined(__GNUC__)
#define cudaSafeCall(expr) cv::gpu::checkCudaError(expr, __FILE__, __LINE__, __func__)
#define cudaSafeCall(expr) cv::cuda::checkCudaError(expr, __FILE__, __LINE__, __func__)
#else /* defined(__CUDACC__) || defined(__MSVC__) */
#define cudaSafeCall(expr) cv::gpu::checkCudaError(expr, __FILE__, __LINE__, "")
#define cudaSafeCall(expr) cv::cuda::checkCudaError(expr, __FILE__, __LINE__, "")
#endif
#endif
namespace cv { namespace gpu
namespace cv { namespace cuda
{
template <typename T> static inline bool isAligned(const T* ptr, size_t size)
{
@@ -85,7 +85,7 @@ namespace cv { namespace gpu
}
}}
namespace cv { namespace gpu
namespace cv { namespace cuda
{
namespace cudev
{

View File

@@ -45,7 +45,7 @@
#include "common.hpp"
namespace cv { namespace gpu { namespace cudev
namespace cv { namespace cuda { namespace cudev
{
#if defined __CUDA_ARCH__ && __CUDA_ARCH__ >= 200
@@ -100,6 +100,6 @@ namespace cv { namespace gpu { namespace cudev
#undef OPENCV_GPU_ASM_PTR
#endif // __CUDA_ARCH__ >= 200
}}} // namespace cv { namespace gpu { namespace cudev
}}} // namespace cv { namespace cuda { namespace cudev
#endif // __OPENCV_GPU_DATAMOV_UTILS_HPP__

View File

@@ -49,7 +49,7 @@
#include "../limits.hpp"
#include "../functional.hpp"
namespace cv { namespace gpu { namespace cudev
namespace cv { namespace cuda { namespace cudev
{
#ifndef CV_DESCALE
#define CV_DESCALE(x, n) (((x) + (1 << ((n)-1))) >> (n))
@@ -146,7 +146,7 @@ namespace cv { namespace gpu { namespace cudev
#define OPENCV_GPU_IMPLEMENT_RGB2RGB_TRAITS(name, scn, dcn, bidx) \
template <typename T> struct name ## _traits \
{ \
typedef ::cv::gpu::cudev::color_detail::RGB2RGB<T, scn, dcn, bidx> functor_type; \
typedef ::cv::cuda::cudev::color_detail::RGB2RGB<T, scn, dcn, bidx> functor_type; \
static __host__ __device__ __forceinline__ functor_type create_functor() \
{ \
return functor_type(); \
@@ -219,7 +219,7 @@ namespace cv { namespace gpu { namespace cudev
#define OPENCV_GPU_IMPLEMENT_RGB2RGB5x5_TRAITS(name, scn, bidx, green_bits) \
struct name ## _traits \
{ \
typedef ::cv::gpu::cudev::color_detail::RGB2RGB5x5<scn, bidx, green_bits> functor_type; \
typedef ::cv::cuda::cudev::color_detail::RGB2RGB5x5<scn, bidx, green_bits> functor_type; \
static __host__ __device__ __forceinline__ functor_type create_functor() \
{ \
return functor_type(); \
@@ -300,7 +300,7 @@ namespace cv { namespace gpu { namespace cudev
#define OPENCV_GPU_IMPLEMENT_RGB5x52RGB_TRAITS(name, dcn, bidx, green_bits) \
struct name ## _traits \
{ \
typedef ::cv::gpu::cudev::color_detail::RGB5x52RGB<dcn, bidx, green_bits> functor_type; \
typedef ::cv::cuda::cudev::color_detail::RGB5x52RGB<dcn, bidx, green_bits> functor_type; \
static __host__ __device__ __forceinline__ functor_type create_functor() \
{ \
return functor_type(); \
@@ -346,7 +346,7 @@ namespace cv { namespace gpu { namespace cudev
#define OPENCV_GPU_IMPLEMENT_GRAY2RGB_TRAITS(name, dcn) \
template <typename T> struct name ## _traits \
{ \
typedef ::cv::gpu::cudev::color_detail::Gray2RGB<T, dcn> functor_type; \
typedef ::cv::cuda::cudev::color_detail::Gray2RGB<T, dcn> functor_type; \
static __host__ __device__ __forceinline__ functor_type create_functor() \
{ \
return functor_type(); \
@@ -388,7 +388,7 @@ namespace cv { namespace gpu { namespace cudev
#define OPENCV_GPU_IMPLEMENT_GRAY2RGB5x5_TRAITS(name, green_bits) \
struct name ## _traits \
{ \
typedef ::cv::gpu::cudev::color_detail::Gray2RGB5x5<green_bits> functor_type; \
typedef ::cv::cuda::cudev::color_detail::Gray2RGB5x5<green_bits> functor_type; \
static __host__ __device__ __forceinline__ functor_type create_functor() \
{ \
return functor_type(); \
@@ -430,7 +430,7 @@ namespace cv { namespace gpu { namespace cudev
#define OPENCV_GPU_IMPLEMENT_RGB5x52GRAY_TRAITS(name, green_bits) \
struct name ## _traits \
{ \
typedef ::cv::gpu::cudev::color_detail::RGB5x52Gray<green_bits> functor_type; \
typedef ::cv::cuda::cudev::color_detail::RGB5x52Gray<green_bits> functor_type; \
static __host__ __device__ __forceinline__ functor_type create_functor() \
{ \
return functor_type(); \
@@ -481,7 +481,7 @@ namespace cv { namespace gpu { namespace cudev
#define OPENCV_GPU_IMPLEMENT_RGB2GRAY_TRAITS(name, scn, bidx) \
template <typename T> struct name ## _traits \
{ \
typedef ::cv::gpu::cudev::color_detail::RGB2Gray<T, scn, bidx> functor_type; \
typedef ::cv::cuda::cudev::color_detail::RGB2Gray<T, scn, bidx> functor_type; \
static __host__ __device__ __forceinline__ functor_type create_functor() \
{ \
return functor_type(); \
@@ -532,7 +532,7 @@ namespace cv { namespace gpu { namespace cudev
#define OPENCV_GPU_IMPLEMENT_RGB2YUV_TRAITS(name, scn, dcn, bidx) \
template <typename T> struct name ## _traits \
{ \
typedef ::cv::gpu::cudev::color_detail::RGB2YUV<T, scn, dcn, bidx> functor_type; \
typedef ::cv::cuda::cudev::color_detail::RGB2YUV<T, scn, dcn, bidx> functor_type; \
static __host__ __device__ __forceinline__ functor_type create_functor() \
{ \
return functor_type(); \
@@ -620,7 +620,7 @@ namespace cv { namespace gpu { namespace cudev
#define OPENCV_GPU_IMPLEMENT_YUV2RGB_TRAITS(name, scn, dcn, bidx) \
template <typename T> struct name ## _traits \
{ \
typedef ::cv::gpu::cudev::color_detail::YUV2RGB<T, scn, dcn, bidx> functor_type; \
typedef ::cv::cuda::cudev::color_detail::YUV2RGB<T, scn, dcn, bidx> functor_type; \
static __host__ __device__ __forceinline__ functor_type create_functor() \
{ \
return functor_type(); \
@@ -699,7 +699,7 @@ namespace cv { namespace gpu { namespace cudev
#define OPENCV_GPU_IMPLEMENT_RGB2YCrCb_TRAITS(name, scn, dcn, bidx) \
template <typename T> struct name ## _traits \
{ \
typedef ::cv::gpu::cudev::color_detail::RGB2YCrCb<T, scn, dcn, bidx> functor_type; \
typedef ::cv::cuda::cudev::color_detail::RGB2YCrCb<T, scn, dcn, bidx> functor_type; \
static __host__ __device__ __forceinline__ functor_type create_functor() \
{ \
return functor_type(); \
@@ -778,7 +778,7 @@ namespace cv { namespace gpu { namespace cudev
#define OPENCV_GPU_IMPLEMENT_YCrCb2RGB_TRAITS(name, scn, dcn, bidx) \
template <typename T> struct name ## _traits \
{ \
typedef ::cv::gpu::cudev::color_detail::YCrCb2RGB<T, scn, dcn, bidx> functor_type; \
typedef ::cv::cuda::cudev::color_detail::YCrCb2RGB<T, scn, dcn, bidx> functor_type; \
static __host__ __device__ __forceinline__ functor_type create_functor() \
{ \
return functor_type(); \
@@ -854,7 +854,7 @@ namespace cv { namespace gpu { namespace cudev
#define OPENCV_GPU_IMPLEMENT_RGB2XYZ_TRAITS(name, scn, dcn, bidx) \
template <typename T> struct name ## _traits \
{ \
typedef ::cv::gpu::cudev::color_detail::RGB2XYZ<T, scn, dcn, bidx> functor_type; \
typedef ::cv::cuda::cudev::color_detail::RGB2XYZ<T, scn, dcn, bidx> functor_type; \
static __host__ __device__ __forceinline__ functor_type create_functor() \
{ \
return functor_type(); \
@@ -929,7 +929,7 @@ namespace cv { namespace gpu { namespace cudev
#define OPENCV_GPU_IMPLEMENT_XYZ2RGB_TRAITS(name, scn, dcn, bidx) \
template <typename T> struct name ## _traits \
{ \
typedef ::cv::gpu::cudev::color_detail::XYZ2RGB<T, scn, dcn, bidx> functor_type; \
typedef ::cv::cuda::cudev::color_detail::XYZ2RGB<T, scn, dcn, bidx> functor_type; \
static __host__ __device__ __forceinline__ functor_type create_functor() \
{ \
return functor_type(); \
@@ -1067,7 +1067,7 @@ namespace cv { namespace gpu { namespace cudev
#define OPENCV_GPU_IMPLEMENT_RGB2HSV_TRAITS(name, scn, dcn, bidx) \
template <typename T> struct name ## _traits \
{ \
typedef ::cv::gpu::cudev::color_detail::RGB2HSV<T, scn, dcn, bidx, 180> functor_type; \
typedef ::cv::cuda::cudev::color_detail::RGB2HSV<T, scn, dcn, bidx, 180> functor_type; \
static __host__ __device__ __forceinline__ functor_type create_functor() \
{ \
return functor_type(); \
@@ -1075,7 +1075,7 @@ namespace cv { namespace gpu { namespace cudev
}; \
template <typename T> struct name ## _full_traits \
{ \
typedef ::cv::gpu::cudev::color_detail::RGB2HSV<T, scn, dcn, bidx, 256> functor_type; \
typedef ::cv::cuda::cudev::color_detail::RGB2HSV<T, scn, dcn, bidx, 256> functor_type; \
static __host__ __device__ __forceinline__ functor_type create_functor() \
{ \
return functor_type(); \
@@ -1083,7 +1083,7 @@ namespace cv { namespace gpu { namespace cudev
}; \
template <> struct name ## _traits<float> \
{ \
typedef ::cv::gpu::cudev::color_detail::RGB2HSV<float, scn, dcn, bidx, 360> functor_type; \
typedef ::cv::cuda::cudev::color_detail::RGB2HSV<float, scn, dcn, bidx, 360> functor_type; \
static __host__ __device__ __forceinline__ functor_type create_functor() \
{ \
return functor_type(); \
@@ -1091,7 +1091,7 @@ namespace cv { namespace gpu { namespace cudev
}; \
template <> struct name ## _full_traits<float> \
{ \
typedef ::cv::gpu::cudev::color_detail::RGB2HSV<float, scn, dcn, bidx, 360> functor_type; \
typedef ::cv::cuda::cudev::color_detail::RGB2HSV<float, scn, dcn, bidx, 360> functor_type; \
static __host__ __device__ __forceinline__ functor_type create_functor() \
{ \
return functor_type(); \
@@ -1207,7 +1207,7 @@ namespace cv { namespace gpu { namespace cudev
#define OPENCV_GPU_IMPLEMENT_HSV2RGB_TRAITS(name, scn, dcn, bidx) \
template <typename T> struct name ## _traits \
{ \
typedef ::cv::gpu::cudev::color_detail::HSV2RGB<T, scn, dcn, bidx, 180> functor_type; \
typedef ::cv::cuda::cudev::color_detail::HSV2RGB<T, scn, dcn, bidx, 180> functor_type; \
static __host__ __device__ __forceinline__ functor_type create_functor() \
{ \
return functor_type(); \
@@ -1215,7 +1215,7 @@ namespace cv { namespace gpu { namespace cudev
}; \
template <typename T> struct name ## _full_traits \
{ \
typedef ::cv::gpu::cudev::color_detail::HSV2RGB<T, scn, dcn, bidx, 255> functor_type; \
typedef ::cv::cuda::cudev::color_detail::HSV2RGB<T, scn, dcn, bidx, 255> functor_type; \
static __host__ __device__ __forceinline__ functor_type create_functor() \
{ \
return functor_type(); \
@@ -1223,7 +1223,7 @@ namespace cv { namespace gpu { namespace cudev
}; \
template <> struct name ## _traits<float> \
{ \
typedef ::cv::gpu::cudev::color_detail::HSV2RGB<float, scn, dcn, bidx, 360> functor_type; \
typedef ::cv::cuda::cudev::color_detail::HSV2RGB<float, scn, dcn, bidx, 360> functor_type; \
static __host__ __device__ __forceinline__ functor_type create_functor() \
{ \
return functor_type(); \
@@ -1231,7 +1231,7 @@ namespace cv { namespace gpu { namespace cudev
}; \
template <> struct name ## _full_traits<float> \
{ \
typedef ::cv::gpu::cudev::color_detail::HSV2RGB<float, scn, dcn, bidx, 360> functor_type; \
typedef ::cv::cuda::cudev::color_detail::HSV2RGB<float, scn, dcn, bidx, 360> functor_type; \
static __host__ __device__ __forceinline__ functor_type create_functor() \
{ \
return functor_type(); \
@@ -1340,7 +1340,7 @@ namespace cv { namespace gpu { namespace cudev
#define OPENCV_GPU_IMPLEMENT_RGB2HLS_TRAITS(name, scn, dcn, bidx) \
template <typename T> struct name ## _traits \
{ \
typedef ::cv::gpu::cudev::color_detail::RGB2HLS<T, scn, dcn, bidx, 180> functor_type; \
typedef ::cv::cuda::cudev::color_detail::RGB2HLS<T, scn, dcn, bidx, 180> functor_type; \
static __host__ __device__ __forceinline__ functor_type create_functor() \
{ \
return functor_type(); \
@@ -1348,7 +1348,7 @@ namespace cv { namespace gpu { namespace cudev
}; \
template <typename T> struct name ## _full_traits \
{ \
typedef ::cv::gpu::cudev::color_detail::RGB2HLS<T, scn, dcn, bidx, 256> functor_type; \
typedef ::cv::cuda::cudev::color_detail::RGB2HLS<T, scn, dcn, bidx, 256> functor_type; \
static __host__ __device__ __forceinline__ functor_type create_functor() \
{ \
return functor_type(); \
@@ -1356,7 +1356,7 @@ namespace cv { namespace gpu { namespace cudev
}; \
template <> struct name ## _traits<float> \
{ \
typedef ::cv::gpu::cudev::color_detail::RGB2HLS<float, scn, dcn, bidx, 360> functor_type; \
typedef ::cv::cuda::cudev::color_detail::RGB2HLS<float, scn, dcn, bidx, 360> functor_type; \
static __host__ __device__ __forceinline__ functor_type create_functor() \
{ \
return functor_type(); \
@@ -1364,7 +1364,7 @@ namespace cv { namespace gpu { namespace cudev
}; \
template <> struct name ## _full_traits<float> \
{ \
typedef ::cv::gpu::cudev::color_detail::RGB2HLS<float, scn, dcn, bidx, 360> functor_type; \
typedef ::cv::cuda::cudev::color_detail::RGB2HLS<float, scn, dcn, bidx, 360> functor_type; \
static __host__ __device__ __forceinline__ functor_type create_functor() \
{ \
return functor_type(); \
@@ -1480,7 +1480,7 @@ namespace cv { namespace gpu { namespace cudev
#define OPENCV_GPU_IMPLEMENT_HLS2RGB_TRAITS(name, scn, dcn, bidx) \
template <typename T> struct name ## _traits \
{ \
typedef ::cv::gpu::cudev::color_detail::HLS2RGB<T, scn, dcn, bidx, 180> functor_type; \
typedef ::cv::cuda::cudev::color_detail::HLS2RGB<T, scn, dcn, bidx, 180> functor_type; \
static __host__ __device__ __forceinline__ functor_type create_functor() \
{ \
return functor_type(); \
@@ -1488,7 +1488,7 @@ namespace cv { namespace gpu { namespace cudev
}; \
template <typename T> struct name ## _full_traits \
{ \
typedef ::cv::gpu::cudev::color_detail::HLS2RGB<T, scn, dcn, bidx, 255> functor_type; \
typedef ::cv::cuda::cudev::color_detail::HLS2RGB<T, scn, dcn, bidx, 255> functor_type; \
static __host__ __device__ __forceinline__ functor_type create_functor() \
{ \
return functor_type(); \
@@ -1496,7 +1496,7 @@ namespace cv { namespace gpu { namespace cudev
}; \
template <> struct name ## _traits<float> \
{ \
typedef ::cv::gpu::cudev::color_detail::HLS2RGB<float, scn, dcn, bidx, 360> functor_type; \
typedef ::cv::cuda::cudev::color_detail::HLS2RGB<float, scn, dcn, bidx, 360> functor_type; \
static __host__ __device__ __forceinline__ functor_type create_functor() \
{ \
return functor_type(); \
@@ -1504,7 +1504,7 @@ namespace cv { namespace gpu { namespace cudev
}; \
template <> struct name ## _full_traits<float> \
{ \
typedef ::cv::gpu::cudev::color_detail::HLS2RGB<float, scn, dcn, bidx, 360> functor_type; \
typedef ::cv::cuda::cudev::color_detail::HLS2RGB<float, scn, dcn, bidx, 360> functor_type; \
static __host__ __device__ __forceinline__ functor_type create_functor() \
{ \
return functor_type(); \
@@ -1649,7 +1649,7 @@ namespace cv { namespace gpu { namespace cudev
#define OPENCV_GPU_IMPLEMENT_RGB2Lab_TRAITS(name, scn, dcn, srgb, blueIdx) \
template <typename T> struct name ## _traits \
{ \
typedef ::cv::gpu::cudev::color_detail::RGB2Lab<T, scn, dcn, srgb, blueIdx> functor_type; \
typedef ::cv::cuda::cudev::color_detail::RGB2Lab<T, scn, dcn, srgb, blueIdx> functor_type; \
static __host__ __device__ __forceinline__ functor_type create_functor() \
{ \
return functor_type(); \
@@ -1762,7 +1762,7 @@ namespace cv { namespace gpu { namespace cudev
#define OPENCV_GPU_IMPLEMENT_Lab2RGB_TRAITS(name, scn, dcn, srgb, blueIdx) \
template <typename T> struct name ## _traits \
{ \
typedef ::cv::gpu::cudev::color_detail::Lab2RGB<T, scn, dcn, srgb, blueIdx> functor_type; \
typedef ::cv::cuda::cudev::color_detail::Lab2RGB<T, scn, dcn, srgb, blueIdx> functor_type; \
static __host__ __device__ __forceinline__ functor_type create_functor() \
{ \
return functor_type(); \
@@ -1861,7 +1861,7 @@ namespace cv { namespace gpu { namespace cudev
#define OPENCV_GPU_IMPLEMENT_RGB2Luv_TRAITS(name, scn, dcn, srgb, blueIdx) \
template <typename T> struct name ## _traits \
{ \
typedef ::cv::gpu::cudev::color_detail::RGB2Luv<T, scn, dcn, srgb, blueIdx> functor_type; \
typedef ::cv::cuda::cudev::color_detail::RGB2Luv<T, scn, dcn, srgb, blueIdx> functor_type; \
static __host__ __device__ __forceinline__ functor_type create_functor() \
{ \
return functor_type(); \
@@ -1962,7 +1962,7 @@ namespace cv { namespace gpu { namespace cudev
#define OPENCV_GPU_IMPLEMENT_Luv2RGB_TRAITS(name, scn, dcn, srgb, blueIdx) \
template <typename T> struct name ## _traits \
{ \
typedef ::cv::gpu::cudev::color_detail::Luv2RGB<T, scn, dcn, srgb, blueIdx> functor_type; \
typedef ::cv::cuda::cudev::color_detail::Luv2RGB<T, scn, dcn, srgb, blueIdx> functor_type; \
static __host__ __device__ __forceinline__ functor_type create_functor() \
{ \
return functor_type(); \
@@ -1971,6 +1971,6 @@ namespace cv { namespace gpu { namespace cudev
#undef CV_DESCALE
}}} // namespace cv { namespace gpu { namespace cudev
}}} // namespace cv { namespace cuda { namespace cudev
#endif // __OPENCV_GPU_COLOR_DETAIL_HPP__

View File

@@ -47,7 +47,7 @@
#include "../warp.hpp"
#include "../warp_shuffle.hpp"
namespace cv { namespace gpu { namespace cudev
namespace cv { namespace cuda { namespace cudev
{
namespace reduce_detail
{

View File

@@ -47,7 +47,7 @@
#include "../warp.hpp"
#include "../warp_shuffle.hpp"
namespace cv { namespace gpu { namespace cudev
namespace cv { namespace cuda { namespace cudev
{
namespace reduce_key_val_detail
{

View File

@@ -47,7 +47,7 @@
#include "../vec_traits.hpp"
#include "../functional.hpp"
namespace cv { namespace gpu { namespace cudev
namespace cv { namespace cuda { namespace cudev
{
namespace transform_detail
{
@@ -390,6 +390,6 @@ namespace cv { namespace gpu { namespace cudev
}
};
} // namespace transform_detail
}}} // namespace cv { namespace gpu { namespace cudev
}}} // namespace cv { namespace cuda { namespace cudev
#endif // __OPENCV_GPU_TRANSFORM_DETAIL_HPP__

View File

@@ -46,7 +46,7 @@
#include "../common.hpp"
#include "../vec_traits.hpp"
namespace cv { namespace gpu { namespace cudev
namespace cv { namespace cuda { namespace cudev
{
namespace type_traits_detail
{
@@ -182,6 +182,6 @@ namespace cv { namespace gpu { namespace cudev
enum { value = 1 };
};
} // namespace type_traits_detail
}}} // namespace cv { namespace gpu { namespace cudev
}}} // namespace cv { namespace cuda { namespace cudev
#endif // __OPENCV_GPU_TYPE_TRAITS_DETAIL_HPP__

View File

@@ -45,7 +45,7 @@
#include "../datamov_utils.hpp"
namespace cv { namespace gpu { namespace cudev
namespace cv { namespace cuda { namespace cudev
{
namespace vec_distance_detail
{
@@ -112,6 +112,6 @@ namespace cv { namespace gpu { namespace cudev
}
};
} // namespace vec_distance_detail
}}} // namespace cv { namespace gpu { namespace cudev
}}} // namespace cv { namespace cuda { namespace cudev
#endif // __OPENCV_GPU_VEC_DISTANCE_DETAIL_HPP__

View File

@@ -43,7 +43,7 @@
#ifndef __OPENCV_GPU_DYNAMIC_SMEM_HPP__
#define __OPENCV_GPU_DYNAMIC_SMEM_HPP__
namespace cv { namespace gpu { namespace cudev
namespace cv { namespace cuda { namespace cudev
{
template<class T> struct DynamicSharedMem
{

View File

@@ -46,7 +46,7 @@
#include "common.hpp"
#include "warp_reduce.hpp"
namespace cv { namespace gpu { namespace cudev
namespace cv { namespace cuda { namespace cudev
{
struct Emulation
{
@@ -256,6 +256,6 @@ namespace cv { namespace gpu { namespace cudev
}
};
}; //struct Emulation
}}} // namespace cv { namespace gpu { namespace cudev
}}} // namespace cv { namespace cuda { namespace cudev
#endif /* OPENCV_GPU_EMULATION_HPP_ */

View File

@@ -48,7 +48,7 @@
#include "vec_math.hpp"
#include "type_traits.hpp"
namespace cv { namespace gpu { namespace cudev
namespace cv { namespace cuda { namespace cudev
{
template <typename Ptr2D> struct PointFilter
{
@@ -273,6 +273,6 @@ namespace cv { namespace gpu { namespace cudev
float scale_x, scale_y;
int width, haight;
};
}}} // namespace cv { namespace gpu { namespace cudev
}}} // namespace cv { namespace cuda { namespace cudev
#endif // __OPENCV_GPU_FILTERS_HPP__

View File

@@ -45,7 +45,7 @@
#include <cstdio>
namespace cv { namespace gpu { namespace cudev
namespace cv { namespace cuda { namespace cudev
{
template<class Func>
void printFuncAttrib(Func& func)
@@ -66,6 +66,6 @@ namespace cv { namespace gpu { namespace cudev
printf("\n");
fflush(stdout);
}
}}} // namespace cv { namespace gpu { namespace cudev
}}} // namespace cv { namespace cuda { namespace cudev
#endif /* __OPENCV_GPU_DEVICE_FUNCATTRIB_HPP_ */

View File

@@ -49,7 +49,7 @@
#include "type_traits.hpp"
#include "device_functions.h"
namespace cv { namespace gpu { namespace cudev
namespace cv { namespace cuda { namespace cudev
{
// Function Objects
template<typename Argument, typename Result> struct unary_function : public std::unary_function<Argument, Result> {};
@@ -784,6 +784,6 @@ namespace cv { namespace gpu { namespace cudev
#define OPENCV_GPU_TRANSFORM_FUNCTOR_TRAITS(type) \
template <> struct TransformFunctorTraits< type > : DefaultTransformFunctorTraits< type >
}}} // namespace cv { namespace gpu { namespace cudev
}}} // namespace cv { namespace cuda { namespace cudev
#endif // __OPENCV_GPU_FUNCTIONAL_HPP__

View File

@@ -47,7 +47,7 @@
#include <float.h>
#include "common.hpp"
namespace cv { namespace gpu { namespace cudev
namespace cv { namespace cuda { namespace cudev
{
template <class T> struct numeric_limits;
@@ -117,6 +117,6 @@ template <> struct numeric_limits<double>
static const bool is_signed = true;
};
}}} // namespace cv { namespace gpu { namespace cudev {
}}} // namespace cv { namespace cuda { namespace cudev {
#endif // __OPENCV_GPU_LIMITS_GPU_HPP__

View File

@@ -47,7 +47,7 @@
#include "detail/reduce.hpp"
#include "detail/reduce_key_val.hpp"
namespace cv { namespace gpu { namespace cudev
namespace cv { namespace cuda { namespace cudev
{
template <int N, typename T, class Op>
__device__ __forceinline__ void reduce(volatile T* smem, T& val, unsigned int tid, const Op& op)

View File

@@ -45,7 +45,7 @@
#include "common.hpp"
namespace cv { namespace gpu { namespace cudev
namespace cv { namespace cuda { namespace cudev
{
template<typename _Tp> __device__ __forceinline__ _Tp saturate_cast(uchar v) { return _Tp(v); }
template<typename _Tp> __device__ __forceinline__ _Tp saturate_cast(schar v) { return _Tp(v); }

View File

@@ -48,7 +48,7 @@
#include "opencv2/core/cuda/warp.hpp"
#include "opencv2/core/cuda/warp_shuffle.hpp"
namespace cv { namespace gpu { namespace cudev
namespace cv { namespace cuda { namespace cudev
{
enum ScanKind { EXCLUSIVE = 0, INCLUSIVE = 1 };
@@ -174,13 +174,13 @@ namespace cv { namespace gpu { namespace cudev
__device__ T warpScanInclusive(T idata, volatile T* s_Data, unsigned int tid)
{
#if __CUDA_ARCH__ >= 300
const unsigned int laneId = cv::gpu::cudev::Warp::laneId();
const unsigned int laneId = cv::cuda::cudev::Warp::laneId();
// scan on shuffl functions
#pragma unroll
for (int i = 1; i <= (OPENCV_GPU_WARP_SIZE / 2); i *= 2)
{
const T n = cv::gpu::cudev::shfl_up(idata, i);
const T n = cv::cuda::cudev::shfl_up(idata, i);
if (laneId >= i)
idata += n;
}

View File

@@ -123,7 +123,7 @@
vmin4(a,b) per-byte unsigned minimum: min(a, b)
*/
namespace cv { namespace gpu { namespace cudev
namespace cv { namespace cuda { namespace cudev
{
// 2

View File

@@ -47,7 +47,7 @@
#include "utility.hpp"
#include "detail/transform_detail.hpp"
namespace cv { namespace gpu { namespace cudev
namespace cv { namespace cuda { namespace cudev
{
template <typename T, typename D, typename UnOp, typename Mask>
static inline void transform(PtrStepSz<T> src, PtrStepSz<D> dst, UnOp op, const Mask& mask, cudaStream_t stream)

View File

@@ -45,7 +45,7 @@
#include "detail/type_traits_detail.hpp"
namespace cv { namespace gpu { namespace cudev
namespace cv { namespace cuda { namespace cudev
{
template <typename T> struct IsSimpleParameter
{

View File

@@ -46,7 +46,7 @@
#include "saturate_cast.hpp"
#include "datamov_utils.hpp"
namespace cv { namespace gpu { namespace cudev
namespace cv { namespace cuda { namespace cudev
{
#define OPENCV_GPU_LOG_WARP_SIZE (5)
#define OPENCV_GPU_WARP_SIZE (1 << OPENCV_GPU_LOG_WARP_SIZE)
@@ -208,6 +208,6 @@ namespace cv { namespace gpu { namespace cudev
return false;
}
}}} // namespace cv { namespace gpu { namespace cudev
}}} // namespace cv { namespace cuda { namespace cudev
#endif // __OPENCV_GPU_UTILITY_HPP__

View File

@@ -47,7 +47,7 @@
#include "functional.hpp"
#include "detail/vec_distance_detail.hpp"
namespace cv { namespace gpu { namespace cudev
namespace cv { namespace cuda { namespace cudev
{
template <typename T> struct L1Dist
{
@@ -219,6 +219,6 @@ namespace cv { namespace gpu { namespace cudev
U vec1Vals[MAX_LEN / THREAD_DIM];
};
}}} // namespace cv { namespace gpu { namespace cudev
}}} // namespace cv { namespace cuda { namespace cudev
#endif // __OPENCV_GPU_VEC_DISTANCE_HPP__

View File

@@ -46,7 +46,7 @@
#include "vec_traits.hpp"
#include "saturate_cast.hpp"
namespace cv { namespace gpu { namespace cudev
namespace cv { namespace cuda { namespace cudev
{
// saturate_cast
@@ -917,6 +917,6 @@ CV_CUDEV_IMPLEMENT_SCALAR_BINARY_FUNC(atan2, ::atan2, double, double, double)
#undef CV_CUDEV_IMPLEMENT_SCALAR_BINARY_FUNC
}}} // namespace cv { namespace gpu { namespace device
}}} // namespace cv { namespace cuda { namespace device
#endif // __OPENCV_GPU_VECMATH_HPP__

View File

@@ -45,7 +45,7 @@
#include "common.hpp"
namespace cv { namespace gpu { namespace cudev
namespace cv { namespace cuda { namespace cudev
{
template<typename T, int N> struct TypeVec;
@@ -275,6 +275,6 @@ namespace cv { namespace gpu { namespace cudev
static __device__ __host__ __forceinline__ char8 make(schar a0, schar a1, schar a2, schar a3, schar a4, schar a5, schar a6, schar a7) {return make_char8(a0, a1, a2, a3, a4, a5, a6, a7);}
static __device__ __host__ __forceinline__ char8 make(const schar* v) {return make_char8(v[0], v[1], v[2], v[3], v[4], v[5], v[6], v[7]);}
};
}}} // namespace cv { namespace gpu { namespace cudev
}}} // namespace cv { namespace cuda { namespace cudev
#endif // __OPENCV_GPU_VEC_TRAITS_HPP__

View File

@@ -43,7 +43,7 @@
#ifndef __OPENCV_GPU_DEVICE_WARP_HPP__
#define __OPENCV_GPU_DEVICE_WARP_HPP__
namespace cv { namespace gpu { namespace cudev
namespace cv { namespace cuda { namespace cudev
{
struct Warp
{
@@ -126,6 +126,6 @@ namespace cv { namespace gpu { namespace cudev
*t = value;
}
};
}}} // namespace cv { namespace gpu { namespace cudev
}}} // namespace cv { namespace cuda { namespace cudev
#endif /* __OPENCV_GPU_DEVICE_WARP_HPP__ */

View File

@@ -43,7 +43,7 @@
#ifndef OPENCV_GPU_WARP_REDUCE_HPP__
#define OPENCV_GPU_WARP_REDUCE_HPP__
namespace cv { namespace gpu { namespace cudev
namespace cv { namespace cuda { namespace cudev
{
template <class T>
__device__ __forceinline__ T warp_reduce(volatile T *ptr , const unsigned int tid = threadIdx.x)
@@ -63,6 +63,6 @@ namespace cv { namespace gpu { namespace cudev
return ptr[tid - lane];
}
}}} // namespace cv { namespace gpu { namespace cudev {
}}} // namespace cv { namespace cuda { namespace cudev {
#endif /* OPENCV_GPU_WARP_REDUCE_HPP__ */

View File

@@ -43,7 +43,7 @@
#ifndef __OPENCV_GPU_WARP_SHUFFLE_HPP__
#define __OPENCV_GPU_WARP_SHUFFLE_HPP__
namespace cv { namespace gpu { namespace cudev
namespace cv { namespace cuda { namespace cudev
{
template <typename T>
__device__ __forceinline__ T shfl(T val, int srcLane, int width = warpSize)

View File

@@ -51,7 +51,7 @@
#include "opencv2/core.hpp"
#include "opencv2/core/gpu_types.hpp"
namespace cv { namespace gpu {
namespace cv { namespace cuda {
//////////////////////////////// GpuMat ///////////////////////////////
@@ -664,12 +664,12 @@ private:
CV_EXPORTS void printCudaDeviceInfo(int device);
CV_EXPORTS void printShortCudaDeviceInfo(int device);
}} // namespace cv { namespace gpu {
}} // namespace cv { namespace cuda {
namespace cv {
template <> CV_EXPORTS void Ptr<cv::gpu::Stream::Impl>::delete_obj();
template <> CV_EXPORTS void Ptr<cv::gpu::Event::Impl>::delete_obj();
template <> CV_EXPORTS void Ptr<cv::cuda::Stream::Impl>::delete_obj();
template <> CV_EXPORTS void Ptr<cv::cuda::Event::Impl>::delete_obj();
}

View File

@@ -46,7 +46,7 @@
#include "opencv2/core/gpu.hpp"
namespace cv { namespace gpu {
namespace cv { namespace cuda {
//////////////////////////////// GpuMat ///////////////////////////////
@@ -587,14 +587,14 @@ bool DeviceInfo::supports(FeatureSet feature_set) const
return version >= feature_set;
}
}} // namespace cv { namespace gpu {
}} // namespace cv { namespace cuda {
//////////////////////////////// Mat ////////////////////////////////
namespace cv {
inline
Mat::Mat(const gpu::GpuMat& m)
Mat::Mat(const cuda::GpuMat& m)
: flags(0), dims(0), rows(0), cols(0), data(0), refcount(0), datastart(0), dataend(0), datalimit(0), allocator(0), size(&rows)
{
m.download(*this);

View File

@@ -57,7 +57,7 @@
namespace cv
{
namespace gpu
namespace cuda
{
class Stream;
class Event;

View File

@@ -55,7 +55,7 @@
namespace cv
{
namespace gpu
namespace cuda
{
// Simple lightweight structures that encapsulates information about an image on device.
// It is intended to pass to nvcc-compiled code. GpuMat depends on headers that nvcc can't compile

View File

@@ -93,14 +93,14 @@ public:
template<typename _Tp> _InputArray(const _Tp* vec, int n);
template<typename _Tp, int m, int n> _InputArray(const Matx<_Tp, m, n>& matx);
_InputArray(const double& val);
_InputArray(const gpu::GpuMat& d_mat);
_InputArray(const cuda::GpuMat& d_mat);
_InputArray(const ogl::Buffer& buf);
_InputArray(const gpu::CudaMem& cuda_mem);
_InputArray(const cuda::CudaMem& cuda_mem);
template<typename _Tp> _InputArray(const cudev::GpuMat_<_Tp>& m);
virtual Mat getMat(int i=-1) const;
virtual void getMatVector(std::vector<Mat>& mv) const;
virtual gpu::GpuMat getGpuMat() const;
virtual cuda::GpuMat getGpuMat() const;
virtual ogl::Buffer getOGlBuffer() const;
virtual int kind() const;
@@ -142,9 +142,9 @@ public:
_OutputArray();
_OutputArray(Mat& m);
_OutputArray(std::vector<Mat>& vec);
_OutputArray(gpu::GpuMat& d_mat);
_OutputArray(cuda::GpuMat& d_mat);
_OutputArray(ogl::Buffer& buf);
_OutputArray(gpu::CudaMem& cuda_mem);
_OutputArray(cuda::CudaMem& cuda_mem);
template<typename _Tp> _OutputArray(cudev::GpuMat_<_Tp>& m);
template<typename _Tp> _OutputArray(std::vector<_Tp>& vec);
template<typename _Tp> _OutputArray(std::vector<std::vector<_Tp> >& vec);
@@ -155,9 +155,9 @@ public:
_OutputArray(const Mat& m);
_OutputArray(const std::vector<Mat>& vec);
_OutputArray(const gpu::GpuMat& d_mat);
_OutputArray(const cuda::GpuMat& d_mat);
_OutputArray(const ogl::Buffer& buf);
_OutputArray(const gpu::CudaMem& cuda_mem);
_OutputArray(const cuda::CudaMem& cuda_mem);
template<typename _Tp> _OutputArray(const cudev::GpuMat_<_Tp>& m);
template<typename _Tp> _OutputArray(const std::vector<_Tp>& vec);
template<typename _Tp> _OutputArray(const std::vector<std::vector<_Tp> >& vec);
@@ -170,9 +170,9 @@ public:
virtual bool fixedType() const;
virtual bool needed() const;
virtual Mat& getMatRef(int i=-1) const;
virtual gpu::GpuMat& getGpuMatRef() const;
virtual cuda::GpuMat& getGpuMatRef() const;
virtual ogl::Buffer& getOGlBufferRef() const;
virtual gpu::CudaMem& getCudaMemRef() const;
virtual cuda::CudaMem& getCudaMemRef() const;
virtual void create(Size sz, int type, int i=-1, bool allowTransposed=false, int fixedDepthMask=0) const;
virtual void create(int rows, int cols, int type, int i=-1, bool allowTransposed=false, int fixedDepthMask=0) const;
virtual void create(int dims, const int* size, int type, int i=-1, bool allowTransposed=false, int fixedDepthMask=0) const;
@@ -506,7 +506,7 @@ public:
//Mat(const void* img, bool copyData=false);
//! download data from GpuMat
explicit Mat(const gpu::GpuMat& m);
explicit Mat(const cuda::GpuMat& m);
//! destructor - calls release()
~Mat();

View File

@@ -99,12 +99,12 @@ public:
//! copy from host/device memory (blocking)
void copyFrom(InputArray arr, Target target = ARRAY_BUFFER, bool autoRelease = false);
//! copy from device memory (non blocking)
void copyFrom(InputArray arr, gpu::Stream& stream, Target target = ARRAY_BUFFER, bool autoRelease = false);
void copyFrom(InputArray arr, cuda::Stream& stream, Target target = ARRAY_BUFFER, bool autoRelease = false);
//! copy to host/device memory (blocking)
void copyTo(OutputArray arr) const;
//! copy to device memory (non blocking)
void copyTo(OutputArray arr, gpu::Stream& stream) const;
void copyTo(OutputArray arr, cuda::Stream& stream) const;
//! create copy of current buffer
Buffer clone(Target target = ARRAY_BUFFER, bool autoRelease = false) const;
@@ -120,12 +120,12 @@ public:
void unmapHost();
//! map to device memory (blocking)
gpu::GpuMat mapDevice();
cuda::GpuMat mapDevice();
void unmapDevice();
//! map to device memory (non blocking)
gpu::GpuMat mapDevice(gpu::Stream& stream);
void unmapDevice(gpu::Stream& stream);
cuda::GpuMat mapDevice(cuda::Stream& stream);
void unmapDevice(cuda::Stream& stream);
int rows() const;
int cols() const;
@@ -276,7 +276,7 @@ CV_EXPORTS void render(const Arrays& arr, InputArray indices, int mode = POINTS,
}} // namespace cv::ogl
namespace cv { namespace gpu {
namespace cv { namespace cuda {
//! set a CUDA device to use OpenGL interoperability
CV_EXPORTS void setGlDevice(int device = 0);

View File

@@ -75,7 +75,7 @@
# endif
#endif
namespace cv { namespace gpu {
namespace cv { namespace cuda {
CV_EXPORTS cv::String getNppErrorMessage(int code);
CV_EXPORTS cv::String getCudaDriverApiErrorMessage(int code);
}}
@@ -88,7 +88,7 @@ static inline void throw_no_cuda() { CV_Error(cv::Error::GpuNotSupported, "The l
static inline void throw_no_cuda() { CV_Error(cv::Error::StsNotImplemented, "The called functionality is disabled for current build or platform"); }
namespace cv { namespace gpu
namespace cv { namespace cuda
{
static inline void checkNppError(int code, const char* file, const int line, const char* func)
{
@@ -131,11 +131,11 @@ namespace cv { namespace gpu
}}
#if defined(__GNUC__)
#define nppSafeCall(expr) cv::gpu::checkNppError(expr, __FILE__, __LINE__, __func__)
#define cuSafeCall(expr) cv::gpu::checkCudaDriverApiError(expr, __FILE__, __LINE__, __func__)
#define nppSafeCall(expr) cv::cuda::checkNppError(expr, __FILE__, __LINE__, __func__)
#define cuSafeCall(expr) cv::cuda::checkCudaDriverApiError(expr, __FILE__, __LINE__, __func__)
#else /* defined(__CUDACC__) || defined(__MSVC__) */
#define nppSafeCall(expr) cv::gpu::checkNppError(expr, __FILE__, __LINE__, "")
#define cuSafeCall(expr) cv::gpu::checkCudaDriverApiError(expr, __FILE__, __LINE__, "")
#define nppSafeCall(expr) cv::cuda::checkNppError(expr, __FILE__, __LINE__, "")
#define cuSafeCall(expr) cv::cuda::checkCudaDriverApiError(expr, __FILE__, __LINE__, "")
#endif
#endif // HAVE_CUDA