mirror of
https://github.com/opencv/opencv.git
synced 2026-07-29 23:33:05 +04:00
renamed gpu namespace -> cuda
This commit is contained in:
@@ -490,7 +490,7 @@ namespace ogl
|
||||
class CV_EXPORTS Arrays;
|
||||
}
|
||||
|
||||
namespace gpu
|
||||
namespace cuda
|
||||
{
|
||||
class CV_EXPORTS GpuMat;
|
||||
class CV_EXPORTS CudaMem;
|
||||
|
||||
@@ -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
|
||||
{
|
||||
|
||||
@@ -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__
|
||||
|
||||
@@ -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__
|
||||
|
||||
@@ -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
|
||||
{
|
||||
|
||||
@@ -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__
|
||||
|
||||
@@ -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__
|
||||
|
||||
@@ -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
|
||||
{
|
||||
|
||||
@@ -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
|
||||
{
|
||||
|
||||
@@ -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__
|
||||
|
||||
@@ -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__
|
||||
|
||||
@@ -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__
|
||||
|
||||
@@ -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
|
||||
{
|
||||
|
||||
@@ -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_ */
|
||||
|
||||
@@ -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__
|
||||
|
||||
@@ -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_ */
|
||||
|
||||
@@ -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__
|
||||
|
||||
@@ -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__
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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); }
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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
|
||||
{
|
||||
|
||||
@@ -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__
|
||||
|
||||
@@ -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__
|
||||
|
||||
@@ -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__
|
||||
|
||||
@@ -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__
|
||||
|
||||
@@ -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__ */
|
||||
|
||||
@@ -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__ */
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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();
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -57,7 +57,7 @@
|
||||
|
||||
namespace cv
|
||||
{
|
||||
namespace gpu
|
||||
namespace cuda
|
||||
{
|
||||
class Stream;
|
||||
class Event;
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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();
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -52,13 +52,13 @@
|
||||
#include "opencv2/cudev.hpp"
|
||||
|
||||
using namespace cv;
|
||||
using namespace cv::gpu;
|
||||
using namespace cv::cuda;
|
||||
using namespace cv::cudev;
|
||||
|
||||
/////////////////////////////////////////////////////
|
||||
/// create
|
||||
|
||||
void cv::gpu::GpuMat::create(int _rows, int _cols, int _type)
|
||||
void cv::cuda::GpuMat::create(int _rows, int _cols, int _type)
|
||||
{
|
||||
CV_DbgAssert( _rows >= 0 && _cols >= 0 );
|
||||
|
||||
@@ -108,7 +108,7 @@ void cv::gpu::GpuMat::create(int _rows, int _cols, int _type)
|
||||
/////////////////////////////////////////////////////
|
||||
/// release
|
||||
|
||||
void cv::gpu::GpuMat::release()
|
||||
void cv::cuda::GpuMat::release()
|
||||
{
|
||||
if (refcount && CV_XADD(refcount, -1) == 1)
|
||||
{
|
||||
@@ -124,7 +124,7 @@ void cv::gpu::GpuMat::release()
|
||||
/////////////////////////////////////////////////////
|
||||
/// upload
|
||||
|
||||
void cv::gpu::GpuMat::upload(InputArray arr)
|
||||
void cv::cuda::GpuMat::upload(InputArray arr)
|
||||
{
|
||||
Mat mat = arr.getMat();
|
||||
|
||||
@@ -135,7 +135,7 @@ void cv::gpu::GpuMat::upload(InputArray arr)
|
||||
CV_CUDEV_SAFE_CALL( cudaMemcpy2D(data, step, mat.data, mat.step, cols * elemSize(), rows, cudaMemcpyHostToDevice) );
|
||||
}
|
||||
|
||||
void cv::gpu::GpuMat::upload(InputArray arr, Stream& _stream)
|
||||
void cv::cuda::GpuMat::upload(InputArray arr, Stream& _stream)
|
||||
{
|
||||
Mat mat = arr.getMat();
|
||||
|
||||
@@ -150,7 +150,7 @@ void cv::gpu::GpuMat::upload(InputArray arr, Stream& _stream)
|
||||
/////////////////////////////////////////////////////
|
||||
/// download
|
||||
|
||||
void cv::gpu::GpuMat::download(OutputArray _dst) const
|
||||
void cv::cuda::GpuMat::download(OutputArray _dst) const
|
||||
{
|
||||
CV_DbgAssert( !empty() );
|
||||
|
||||
@@ -160,7 +160,7 @@ void cv::gpu::GpuMat::download(OutputArray _dst) const
|
||||
CV_CUDEV_SAFE_CALL( cudaMemcpy2D(dst.data, dst.step, data, step, cols * elemSize(), rows, cudaMemcpyDeviceToHost) );
|
||||
}
|
||||
|
||||
void cv::gpu::GpuMat::download(OutputArray _dst, Stream& _stream) const
|
||||
void cv::cuda::GpuMat::download(OutputArray _dst, Stream& _stream) const
|
||||
{
|
||||
CV_DbgAssert( !empty() );
|
||||
|
||||
@@ -174,7 +174,7 @@ void cv::gpu::GpuMat::download(OutputArray _dst, Stream& _stream) const
|
||||
/////////////////////////////////////////////////////
|
||||
/// copyTo
|
||||
|
||||
void cv::gpu::GpuMat::copyTo(OutputArray _dst) const
|
||||
void cv::cuda::GpuMat::copyTo(OutputArray _dst) const
|
||||
{
|
||||
CV_DbgAssert( !empty() );
|
||||
|
||||
@@ -184,7 +184,7 @@ void cv::gpu::GpuMat::copyTo(OutputArray _dst) const
|
||||
CV_CUDEV_SAFE_CALL( cudaMemcpy2D(dst.data, dst.step, data, step, cols * elemSize(), rows, cudaMemcpyDeviceToDevice) );
|
||||
}
|
||||
|
||||
void cv::gpu::GpuMat::copyTo(OutputArray _dst, Stream& _stream) const
|
||||
void cv::cuda::GpuMat::copyTo(OutputArray _dst, Stream& _stream) const
|
||||
{
|
||||
CV_DbgAssert( !empty() );
|
||||
|
||||
@@ -220,7 +220,7 @@ namespace
|
||||
}
|
||||
}
|
||||
|
||||
void cv::gpu::GpuMat::copyTo(OutputArray _dst, InputArray _mask, Stream& stream) const
|
||||
void cv::cuda::GpuMat::copyTo(OutputArray _dst, InputArray _mask, Stream& stream) const
|
||||
{
|
||||
CV_DbgAssert( !empty() );
|
||||
CV_DbgAssert( depth() <= CV_64F && channels() <= 4 );
|
||||
@@ -279,7 +279,7 @@ namespace
|
||||
}
|
||||
}
|
||||
|
||||
GpuMat& cv::gpu::GpuMat::setTo(Scalar value, Stream& stream)
|
||||
GpuMat& cv::cuda::GpuMat::setTo(Scalar value, Stream& stream)
|
||||
{
|
||||
CV_DbgAssert( !empty() );
|
||||
CV_DbgAssert( depth() <= CV_64F && channels() <= 4 );
|
||||
@@ -333,7 +333,7 @@ GpuMat& cv::gpu::GpuMat::setTo(Scalar value, Stream& stream)
|
||||
return *this;
|
||||
}
|
||||
|
||||
GpuMat& cv::gpu::GpuMat::setTo(Scalar value, InputArray _mask, Stream& stream)
|
||||
GpuMat& cv::cuda::GpuMat::setTo(Scalar value, InputArray _mask, Stream& stream)
|
||||
{
|
||||
CV_DbgAssert( !empty() );
|
||||
CV_DbgAssert( depth() <= CV_64F && channels() <= 4 );
|
||||
@@ -412,7 +412,7 @@ namespace
|
||||
}
|
||||
}
|
||||
|
||||
void cv::gpu::GpuMat::convertTo(OutputArray _dst, int rtype, Stream& stream) const
|
||||
void cv::cuda::GpuMat::convertTo(OutputArray _dst, int rtype, Stream& stream) const
|
||||
{
|
||||
if (rtype < 0)
|
||||
rtype = type();
|
||||
@@ -453,7 +453,7 @@ void cv::gpu::GpuMat::convertTo(OutputArray _dst, int rtype, Stream& stream) con
|
||||
funcs[sdepth][ddepth](reshape(1), dst.reshape(1), stream);
|
||||
}
|
||||
|
||||
void cv::gpu::GpuMat::convertTo(OutputArray _dst, int rtype, double alpha, double beta, Stream& stream) const
|
||||
void cv::cuda::GpuMat::convertTo(OutputArray _dst, int rtype, double alpha, double beta, Stream& stream) const
|
||||
{
|
||||
if (rtype < 0)
|
||||
rtype = type();
|
||||
|
||||
@@ -44,7 +44,7 @@
|
||||
#include "precomp.hpp"
|
||||
|
||||
using namespace cv;
|
||||
using namespace cv::gpu;
|
||||
using namespace cv::cuda;
|
||||
|
||||
namespace
|
||||
{
|
||||
@@ -57,7 +57,7 @@ namespace
|
||||
}
|
||||
}
|
||||
|
||||
void cv::gpu::CudaMem::create(int rows_, int cols_, int type_)
|
||||
void cv::cuda::CudaMem::create(int rows_, int cols_, int type_)
|
||||
{
|
||||
#ifndef HAVE_CUDA
|
||||
(void) rows_;
|
||||
@@ -121,7 +121,7 @@ void cv::gpu::CudaMem::create(int rows_, int cols_, int type_)
|
||||
#endif
|
||||
}
|
||||
|
||||
CudaMem cv::gpu::CudaMem::reshape(int new_cn, int new_rows) const
|
||||
CudaMem cv::cuda::CudaMem::reshape(int new_cn, int new_rows) const
|
||||
{
|
||||
CudaMem hdr = *this;
|
||||
|
||||
@@ -164,7 +164,7 @@ CudaMem cv::gpu::CudaMem::reshape(int new_cn, int new_rows) const
|
||||
return hdr;
|
||||
}
|
||||
|
||||
void cv::gpu::CudaMem::release()
|
||||
void cv::cuda::CudaMem::release()
|
||||
{
|
||||
#ifdef HAVE_CUDA
|
||||
if (refcount && CV_XADD(refcount, -1) == 1)
|
||||
@@ -179,7 +179,7 @@ void cv::gpu::CudaMem::release()
|
||||
#endif
|
||||
}
|
||||
|
||||
GpuMat cv::gpu::CudaMem::createGpuMatHeader() const
|
||||
GpuMat cv::cuda::CudaMem::createGpuMatHeader() const
|
||||
{
|
||||
#ifndef HAVE_CUDA
|
||||
throw_no_cuda();
|
||||
@@ -194,7 +194,7 @@ GpuMat cv::gpu::CudaMem::createGpuMatHeader() const
|
||||
#endif
|
||||
}
|
||||
|
||||
void cv::gpu::registerPageLocked(Mat& m)
|
||||
void cv::cuda::registerPageLocked(Mat& m)
|
||||
{
|
||||
#ifndef HAVE_CUDA
|
||||
(void) m;
|
||||
@@ -205,7 +205,7 @@ void cv::gpu::registerPageLocked(Mat& m)
|
||||
#endif
|
||||
}
|
||||
|
||||
void cv::gpu::unregisterPageLocked(Mat& m)
|
||||
void cv::cuda::unregisterPageLocked(Mat& m)
|
||||
{
|
||||
#ifndef HAVE_CUDA
|
||||
(void) m;
|
||||
|
||||
@@ -43,9 +43,9 @@
|
||||
#include "precomp.hpp"
|
||||
|
||||
using namespace cv;
|
||||
using namespace cv::gpu;
|
||||
using namespace cv::cuda;
|
||||
|
||||
int cv::gpu::getCudaEnabledDeviceCount()
|
||||
int cv::cuda::getCudaEnabledDeviceCount()
|
||||
{
|
||||
#ifndef HAVE_CUDA
|
||||
return 0;
|
||||
@@ -64,7 +64,7 @@ int cv::gpu::getCudaEnabledDeviceCount()
|
||||
#endif
|
||||
}
|
||||
|
||||
void cv::gpu::setDevice(int device)
|
||||
void cv::cuda::setDevice(int device)
|
||||
{
|
||||
#ifndef HAVE_CUDA
|
||||
(void) device;
|
||||
@@ -74,7 +74,7 @@ void cv::gpu::setDevice(int device)
|
||||
#endif
|
||||
}
|
||||
|
||||
int cv::gpu::getDevice()
|
||||
int cv::cuda::getDevice()
|
||||
{
|
||||
#ifndef HAVE_CUDA
|
||||
throw_no_cuda();
|
||||
@@ -86,7 +86,7 @@ int cv::gpu::getDevice()
|
||||
#endif
|
||||
}
|
||||
|
||||
void cv::gpu::resetDevice()
|
||||
void cv::cuda::resetDevice()
|
||||
{
|
||||
#ifndef HAVE_CUDA
|
||||
throw_no_cuda();
|
||||
@@ -95,7 +95,7 @@ void cv::gpu::resetDevice()
|
||||
#endif
|
||||
}
|
||||
|
||||
bool cv::gpu::deviceSupports(FeatureSet feature_set)
|
||||
bool cv::cuda::deviceSupports(FeatureSet feature_set)
|
||||
{
|
||||
#ifndef HAVE_CUDA
|
||||
(void) feature_set;
|
||||
@@ -225,7 +225,7 @@ namespace
|
||||
|
||||
#endif
|
||||
|
||||
bool cv::gpu::TargetArchs::builtWith(cv::gpu::FeatureSet feature_set)
|
||||
bool cv::cuda::TargetArchs::builtWith(cv::cuda::FeatureSet feature_set)
|
||||
{
|
||||
#ifndef HAVE_CUDA
|
||||
(void) feature_set;
|
||||
@@ -236,7 +236,7 @@ bool cv::gpu::TargetArchs::builtWith(cv::gpu::FeatureSet feature_set)
|
||||
#endif
|
||||
}
|
||||
|
||||
bool cv::gpu::TargetArchs::hasPtx(int major, int minor)
|
||||
bool cv::cuda::TargetArchs::hasPtx(int major, int minor)
|
||||
{
|
||||
#ifndef HAVE_CUDA
|
||||
(void) major;
|
||||
@@ -248,7 +248,7 @@ bool cv::gpu::TargetArchs::hasPtx(int major, int minor)
|
||||
#endif
|
||||
}
|
||||
|
||||
bool cv::gpu::TargetArchs::hasBin(int major, int minor)
|
||||
bool cv::cuda::TargetArchs::hasBin(int major, int minor)
|
||||
{
|
||||
#ifndef HAVE_CUDA
|
||||
(void) major;
|
||||
@@ -260,7 +260,7 @@ bool cv::gpu::TargetArchs::hasBin(int major, int minor)
|
||||
#endif
|
||||
}
|
||||
|
||||
bool cv::gpu::TargetArchs::hasEqualOrLessPtx(int major, int minor)
|
||||
bool cv::cuda::TargetArchs::hasEqualOrLessPtx(int major, int minor)
|
||||
{
|
||||
#ifndef HAVE_CUDA
|
||||
(void) major;
|
||||
@@ -272,7 +272,7 @@ bool cv::gpu::TargetArchs::hasEqualOrLessPtx(int major, int minor)
|
||||
#endif
|
||||
}
|
||||
|
||||
bool cv::gpu::TargetArchs::hasEqualOrGreaterPtx(int major, int minor)
|
||||
bool cv::cuda::TargetArchs::hasEqualOrGreaterPtx(int major, int minor)
|
||||
{
|
||||
#ifndef HAVE_CUDA
|
||||
(void) major;
|
||||
@@ -284,7 +284,7 @@ bool cv::gpu::TargetArchs::hasEqualOrGreaterPtx(int major, int minor)
|
||||
#endif
|
||||
}
|
||||
|
||||
bool cv::gpu::TargetArchs::hasEqualOrGreaterBin(int major, int minor)
|
||||
bool cv::cuda::TargetArchs::hasEqualOrGreaterBin(int major, int minor)
|
||||
{
|
||||
#ifndef HAVE_CUDA
|
||||
(void) major;
|
||||
@@ -345,7 +345,7 @@ namespace
|
||||
|
||||
#endif
|
||||
|
||||
const char* cv::gpu::DeviceInfo::name() const
|
||||
const char* cv::cuda::DeviceInfo::name() const
|
||||
{
|
||||
#ifndef HAVE_CUDA
|
||||
throw_no_cuda();
|
||||
@@ -355,7 +355,7 @@ const char* cv::gpu::DeviceInfo::name() const
|
||||
#endif
|
||||
}
|
||||
|
||||
size_t cv::gpu::DeviceInfo::totalGlobalMem() const
|
||||
size_t cv::cuda::DeviceInfo::totalGlobalMem() const
|
||||
{
|
||||
#ifndef HAVE_CUDA
|
||||
throw_no_cuda();
|
||||
@@ -365,7 +365,7 @@ size_t cv::gpu::DeviceInfo::totalGlobalMem() const
|
||||
#endif
|
||||
}
|
||||
|
||||
size_t cv::gpu::DeviceInfo::sharedMemPerBlock() const
|
||||
size_t cv::cuda::DeviceInfo::sharedMemPerBlock() const
|
||||
{
|
||||
#ifndef HAVE_CUDA
|
||||
throw_no_cuda();
|
||||
@@ -375,7 +375,7 @@ size_t cv::gpu::DeviceInfo::sharedMemPerBlock() const
|
||||
#endif
|
||||
}
|
||||
|
||||
int cv::gpu::DeviceInfo::regsPerBlock() const
|
||||
int cv::cuda::DeviceInfo::regsPerBlock() const
|
||||
{
|
||||
#ifndef HAVE_CUDA
|
||||
throw_no_cuda();
|
||||
@@ -385,7 +385,7 @@ int cv::gpu::DeviceInfo::regsPerBlock() const
|
||||
#endif
|
||||
}
|
||||
|
||||
int cv::gpu::DeviceInfo::warpSize() const
|
||||
int cv::cuda::DeviceInfo::warpSize() const
|
||||
{
|
||||
#ifndef HAVE_CUDA
|
||||
throw_no_cuda();
|
||||
@@ -395,7 +395,7 @@ int cv::gpu::DeviceInfo::warpSize() const
|
||||
#endif
|
||||
}
|
||||
|
||||
size_t cv::gpu::DeviceInfo::memPitch() const
|
||||
size_t cv::cuda::DeviceInfo::memPitch() const
|
||||
{
|
||||
#ifndef HAVE_CUDA
|
||||
throw_no_cuda();
|
||||
@@ -405,7 +405,7 @@ size_t cv::gpu::DeviceInfo::memPitch() const
|
||||
#endif
|
||||
}
|
||||
|
||||
int cv::gpu::DeviceInfo::maxThreadsPerBlock() const
|
||||
int cv::cuda::DeviceInfo::maxThreadsPerBlock() const
|
||||
{
|
||||
#ifndef HAVE_CUDA
|
||||
throw_no_cuda();
|
||||
@@ -415,7 +415,7 @@ int cv::gpu::DeviceInfo::maxThreadsPerBlock() const
|
||||
#endif
|
||||
}
|
||||
|
||||
Vec3i cv::gpu::DeviceInfo::maxThreadsDim() const
|
||||
Vec3i cv::cuda::DeviceInfo::maxThreadsDim() const
|
||||
{
|
||||
#ifndef HAVE_CUDA
|
||||
throw_no_cuda();
|
||||
@@ -425,7 +425,7 @@ Vec3i cv::gpu::DeviceInfo::maxThreadsDim() const
|
||||
#endif
|
||||
}
|
||||
|
||||
Vec3i cv::gpu::DeviceInfo::maxGridSize() const
|
||||
Vec3i cv::cuda::DeviceInfo::maxGridSize() const
|
||||
{
|
||||
#ifndef HAVE_CUDA
|
||||
throw_no_cuda();
|
||||
@@ -435,7 +435,7 @@ Vec3i cv::gpu::DeviceInfo::maxGridSize() const
|
||||
#endif
|
||||
}
|
||||
|
||||
int cv::gpu::DeviceInfo::clockRate() const
|
||||
int cv::cuda::DeviceInfo::clockRate() const
|
||||
{
|
||||
#ifndef HAVE_CUDA
|
||||
throw_no_cuda();
|
||||
@@ -445,7 +445,7 @@ int cv::gpu::DeviceInfo::clockRate() const
|
||||
#endif
|
||||
}
|
||||
|
||||
size_t cv::gpu::DeviceInfo::totalConstMem() const
|
||||
size_t cv::cuda::DeviceInfo::totalConstMem() const
|
||||
{
|
||||
#ifndef HAVE_CUDA
|
||||
throw_no_cuda();
|
||||
@@ -455,7 +455,7 @@ size_t cv::gpu::DeviceInfo::totalConstMem() const
|
||||
#endif
|
||||
}
|
||||
|
||||
int cv::gpu::DeviceInfo::majorVersion() const
|
||||
int cv::cuda::DeviceInfo::majorVersion() const
|
||||
{
|
||||
#ifndef HAVE_CUDA
|
||||
throw_no_cuda();
|
||||
@@ -465,7 +465,7 @@ int cv::gpu::DeviceInfo::majorVersion() const
|
||||
#endif
|
||||
}
|
||||
|
||||
int cv::gpu::DeviceInfo::minorVersion() const
|
||||
int cv::cuda::DeviceInfo::minorVersion() const
|
||||
{
|
||||
#ifndef HAVE_CUDA
|
||||
throw_no_cuda();
|
||||
@@ -475,7 +475,7 @@ int cv::gpu::DeviceInfo::minorVersion() const
|
||||
#endif
|
||||
}
|
||||
|
||||
size_t cv::gpu::DeviceInfo::textureAlignment() const
|
||||
size_t cv::cuda::DeviceInfo::textureAlignment() const
|
||||
{
|
||||
#ifndef HAVE_CUDA
|
||||
throw_no_cuda();
|
||||
@@ -485,7 +485,7 @@ size_t cv::gpu::DeviceInfo::textureAlignment() const
|
||||
#endif
|
||||
}
|
||||
|
||||
size_t cv::gpu::DeviceInfo::texturePitchAlignment() const
|
||||
size_t cv::cuda::DeviceInfo::texturePitchAlignment() const
|
||||
{
|
||||
#ifndef HAVE_CUDA
|
||||
throw_no_cuda();
|
||||
@@ -495,7 +495,7 @@ size_t cv::gpu::DeviceInfo::texturePitchAlignment() const
|
||||
#endif
|
||||
}
|
||||
|
||||
int cv::gpu::DeviceInfo::multiProcessorCount() const
|
||||
int cv::cuda::DeviceInfo::multiProcessorCount() const
|
||||
{
|
||||
#ifndef HAVE_CUDA
|
||||
throw_no_cuda();
|
||||
@@ -505,7 +505,7 @@ int cv::gpu::DeviceInfo::multiProcessorCount() const
|
||||
#endif
|
||||
}
|
||||
|
||||
bool cv::gpu::DeviceInfo::kernelExecTimeoutEnabled() const
|
||||
bool cv::cuda::DeviceInfo::kernelExecTimeoutEnabled() const
|
||||
{
|
||||
#ifndef HAVE_CUDA
|
||||
throw_no_cuda();
|
||||
@@ -515,7 +515,7 @@ bool cv::gpu::DeviceInfo::kernelExecTimeoutEnabled() const
|
||||
#endif
|
||||
}
|
||||
|
||||
bool cv::gpu::DeviceInfo::integrated() const
|
||||
bool cv::cuda::DeviceInfo::integrated() const
|
||||
{
|
||||
#ifndef HAVE_CUDA
|
||||
throw_no_cuda();
|
||||
@@ -525,7 +525,7 @@ bool cv::gpu::DeviceInfo::integrated() const
|
||||
#endif
|
||||
}
|
||||
|
||||
bool cv::gpu::DeviceInfo::canMapHostMemory() const
|
||||
bool cv::cuda::DeviceInfo::canMapHostMemory() const
|
||||
{
|
||||
#ifndef HAVE_CUDA
|
||||
throw_no_cuda();
|
||||
@@ -535,7 +535,7 @@ bool cv::gpu::DeviceInfo::canMapHostMemory() const
|
||||
#endif
|
||||
}
|
||||
|
||||
DeviceInfo::ComputeMode cv::gpu::DeviceInfo::computeMode() const
|
||||
DeviceInfo::ComputeMode cv::cuda::DeviceInfo::computeMode() const
|
||||
{
|
||||
#ifndef HAVE_CUDA
|
||||
throw_no_cuda();
|
||||
@@ -553,7 +553,7 @@ DeviceInfo::ComputeMode cv::gpu::DeviceInfo::computeMode() const
|
||||
#endif
|
||||
}
|
||||
|
||||
int cv::gpu::DeviceInfo::maxTexture1D() const
|
||||
int cv::cuda::DeviceInfo::maxTexture1D() const
|
||||
{
|
||||
#ifndef HAVE_CUDA
|
||||
throw_no_cuda();
|
||||
@@ -563,7 +563,7 @@ int cv::gpu::DeviceInfo::maxTexture1D() const
|
||||
#endif
|
||||
}
|
||||
|
||||
int cv::gpu::DeviceInfo::maxTexture1DMipmap() const
|
||||
int cv::cuda::DeviceInfo::maxTexture1DMipmap() const
|
||||
{
|
||||
#ifndef HAVE_CUDA
|
||||
throw_no_cuda();
|
||||
@@ -578,7 +578,7 @@ int cv::gpu::DeviceInfo::maxTexture1DMipmap() const
|
||||
#endif
|
||||
}
|
||||
|
||||
int cv::gpu::DeviceInfo::maxTexture1DLinear() const
|
||||
int cv::cuda::DeviceInfo::maxTexture1DLinear() const
|
||||
{
|
||||
#ifndef HAVE_CUDA
|
||||
throw_no_cuda();
|
||||
@@ -588,7 +588,7 @@ int cv::gpu::DeviceInfo::maxTexture1DLinear() const
|
||||
#endif
|
||||
}
|
||||
|
||||
Vec2i cv::gpu::DeviceInfo::maxTexture2D() const
|
||||
Vec2i cv::cuda::DeviceInfo::maxTexture2D() const
|
||||
{
|
||||
#ifndef HAVE_CUDA
|
||||
throw_no_cuda();
|
||||
@@ -598,7 +598,7 @@ Vec2i cv::gpu::DeviceInfo::maxTexture2D() const
|
||||
#endif
|
||||
}
|
||||
|
||||
Vec2i cv::gpu::DeviceInfo::maxTexture2DMipmap() const
|
||||
Vec2i cv::cuda::DeviceInfo::maxTexture2DMipmap() const
|
||||
{
|
||||
#ifndef HAVE_CUDA
|
||||
throw_no_cuda();
|
||||
@@ -613,7 +613,7 @@ Vec2i cv::gpu::DeviceInfo::maxTexture2DMipmap() const
|
||||
#endif
|
||||
}
|
||||
|
||||
Vec3i cv::gpu::DeviceInfo::maxTexture2DLinear() const
|
||||
Vec3i cv::cuda::DeviceInfo::maxTexture2DLinear() const
|
||||
{
|
||||
#ifndef HAVE_CUDA
|
||||
throw_no_cuda();
|
||||
@@ -623,7 +623,7 @@ Vec3i cv::gpu::DeviceInfo::maxTexture2DLinear() const
|
||||
#endif
|
||||
}
|
||||
|
||||
Vec2i cv::gpu::DeviceInfo::maxTexture2DGather() const
|
||||
Vec2i cv::cuda::DeviceInfo::maxTexture2DGather() const
|
||||
{
|
||||
#ifndef HAVE_CUDA
|
||||
throw_no_cuda();
|
||||
@@ -633,7 +633,7 @@ Vec2i cv::gpu::DeviceInfo::maxTexture2DGather() const
|
||||
#endif
|
||||
}
|
||||
|
||||
Vec3i cv::gpu::DeviceInfo::maxTexture3D() const
|
||||
Vec3i cv::cuda::DeviceInfo::maxTexture3D() const
|
||||
{
|
||||
#ifndef HAVE_CUDA
|
||||
throw_no_cuda();
|
||||
@@ -643,7 +643,7 @@ Vec3i cv::gpu::DeviceInfo::maxTexture3D() const
|
||||
#endif
|
||||
}
|
||||
|
||||
int cv::gpu::DeviceInfo::maxTextureCubemap() const
|
||||
int cv::cuda::DeviceInfo::maxTextureCubemap() const
|
||||
{
|
||||
#ifndef HAVE_CUDA
|
||||
throw_no_cuda();
|
||||
@@ -653,7 +653,7 @@ int cv::gpu::DeviceInfo::maxTextureCubemap() const
|
||||
#endif
|
||||
}
|
||||
|
||||
Vec2i cv::gpu::DeviceInfo::maxTexture1DLayered() const
|
||||
Vec2i cv::cuda::DeviceInfo::maxTexture1DLayered() const
|
||||
{
|
||||
#ifndef HAVE_CUDA
|
||||
throw_no_cuda();
|
||||
@@ -663,7 +663,7 @@ Vec2i cv::gpu::DeviceInfo::maxTexture1DLayered() const
|
||||
#endif
|
||||
}
|
||||
|
||||
Vec3i cv::gpu::DeviceInfo::maxTexture2DLayered() const
|
||||
Vec3i cv::cuda::DeviceInfo::maxTexture2DLayered() const
|
||||
{
|
||||
#ifndef HAVE_CUDA
|
||||
throw_no_cuda();
|
||||
@@ -673,7 +673,7 @@ Vec3i cv::gpu::DeviceInfo::maxTexture2DLayered() const
|
||||
#endif
|
||||
}
|
||||
|
||||
Vec2i cv::gpu::DeviceInfo::maxTextureCubemapLayered() const
|
||||
Vec2i cv::cuda::DeviceInfo::maxTextureCubemapLayered() const
|
||||
{
|
||||
#ifndef HAVE_CUDA
|
||||
throw_no_cuda();
|
||||
@@ -683,7 +683,7 @@ Vec2i cv::gpu::DeviceInfo::maxTextureCubemapLayered() const
|
||||
#endif
|
||||
}
|
||||
|
||||
int cv::gpu::DeviceInfo::maxSurface1D() const
|
||||
int cv::cuda::DeviceInfo::maxSurface1D() const
|
||||
{
|
||||
#ifndef HAVE_CUDA
|
||||
throw_no_cuda();
|
||||
@@ -693,7 +693,7 @@ int cv::gpu::DeviceInfo::maxSurface1D() const
|
||||
#endif
|
||||
}
|
||||
|
||||
Vec2i cv::gpu::DeviceInfo::maxSurface2D() const
|
||||
Vec2i cv::cuda::DeviceInfo::maxSurface2D() const
|
||||
{
|
||||
#ifndef HAVE_CUDA
|
||||
throw_no_cuda();
|
||||
@@ -703,7 +703,7 @@ Vec2i cv::gpu::DeviceInfo::maxSurface2D() const
|
||||
#endif
|
||||
}
|
||||
|
||||
Vec3i cv::gpu::DeviceInfo::maxSurface3D() const
|
||||
Vec3i cv::cuda::DeviceInfo::maxSurface3D() const
|
||||
{
|
||||
#ifndef HAVE_CUDA
|
||||
throw_no_cuda();
|
||||
@@ -713,7 +713,7 @@ Vec3i cv::gpu::DeviceInfo::maxSurface3D() const
|
||||
#endif
|
||||
}
|
||||
|
||||
Vec2i cv::gpu::DeviceInfo::maxSurface1DLayered() const
|
||||
Vec2i cv::cuda::DeviceInfo::maxSurface1DLayered() const
|
||||
{
|
||||
#ifndef HAVE_CUDA
|
||||
throw_no_cuda();
|
||||
@@ -723,7 +723,7 @@ Vec2i cv::gpu::DeviceInfo::maxSurface1DLayered() const
|
||||
#endif
|
||||
}
|
||||
|
||||
Vec3i cv::gpu::DeviceInfo::maxSurface2DLayered() const
|
||||
Vec3i cv::cuda::DeviceInfo::maxSurface2DLayered() const
|
||||
{
|
||||
#ifndef HAVE_CUDA
|
||||
throw_no_cuda();
|
||||
@@ -733,7 +733,7 @@ Vec3i cv::gpu::DeviceInfo::maxSurface2DLayered() const
|
||||
#endif
|
||||
}
|
||||
|
||||
int cv::gpu::DeviceInfo::maxSurfaceCubemap() const
|
||||
int cv::cuda::DeviceInfo::maxSurfaceCubemap() const
|
||||
{
|
||||
#ifndef HAVE_CUDA
|
||||
throw_no_cuda();
|
||||
@@ -743,7 +743,7 @@ int cv::gpu::DeviceInfo::maxSurfaceCubemap() const
|
||||
#endif
|
||||
}
|
||||
|
||||
Vec2i cv::gpu::DeviceInfo::maxSurfaceCubemapLayered() const
|
||||
Vec2i cv::cuda::DeviceInfo::maxSurfaceCubemapLayered() const
|
||||
{
|
||||
#ifndef HAVE_CUDA
|
||||
throw_no_cuda();
|
||||
@@ -753,7 +753,7 @@ Vec2i cv::gpu::DeviceInfo::maxSurfaceCubemapLayered() const
|
||||
#endif
|
||||
}
|
||||
|
||||
size_t cv::gpu::DeviceInfo::surfaceAlignment() const
|
||||
size_t cv::cuda::DeviceInfo::surfaceAlignment() const
|
||||
{
|
||||
#ifndef HAVE_CUDA
|
||||
throw_no_cuda();
|
||||
@@ -763,7 +763,7 @@ size_t cv::gpu::DeviceInfo::surfaceAlignment() const
|
||||
#endif
|
||||
}
|
||||
|
||||
bool cv::gpu::DeviceInfo::concurrentKernels() const
|
||||
bool cv::cuda::DeviceInfo::concurrentKernels() const
|
||||
{
|
||||
#ifndef HAVE_CUDA
|
||||
throw_no_cuda();
|
||||
@@ -773,7 +773,7 @@ bool cv::gpu::DeviceInfo::concurrentKernels() const
|
||||
#endif
|
||||
}
|
||||
|
||||
bool cv::gpu::DeviceInfo::ECCEnabled() const
|
||||
bool cv::cuda::DeviceInfo::ECCEnabled() const
|
||||
{
|
||||
#ifndef HAVE_CUDA
|
||||
throw_no_cuda();
|
||||
@@ -783,7 +783,7 @@ bool cv::gpu::DeviceInfo::ECCEnabled() const
|
||||
#endif
|
||||
}
|
||||
|
||||
int cv::gpu::DeviceInfo::pciBusID() const
|
||||
int cv::cuda::DeviceInfo::pciBusID() const
|
||||
{
|
||||
#ifndef HAVE_CUDA
|
||||
throw_no_cuda();
|
||||
@@ -793,7 +793,7 @@ int cv::gpu::DeviceInfo::pciBusID() const
|
||||
#endif
|
||||
}
|
||||
|
||||
int cv::gpu::DeviceInfo::pciDeviceID() const
|
||||
int cv::cuda::DeviceInfo::pciDeviceID() const
|
||||
{
|
||||
#ifndef HAVE_CUDA
|
||||
throw_no_cuda();
|
||||
@@ -803,7 +803,7 @@ int cv::gpu::DeviceInfo::pciDeviceID() const
|
||||
#endif
|
||||
}
|
||||
|
||||
int cv::gpu::DeviceInfo::pciDomainID() const
|
||||
int cv::cuda::DeviceInfo::pciDomainID() const
|
||||
{
|
||||
#ifndef HAVE_CUDA
|
||||
throw_no_cuda();
|
||||
@@ -813,7 +813,7 @@ int cv::gpu::DeviceInfo::pciDomainID() const
|
||||
#endif
|
||||
}
|
||||
|
||||
bool cv::gpu::DeviceInfo::tccDriver() const
|
||||
bool cv::cuda::DeviceInfo::tccDriver() const
|
||||
{
|
||||
#ifndef HAVE_CUDA
|
||||
throw_no_cuda();
|
||||
@@ -823,7 +823,7 @@ bool cv::gpu::DeviceInfo::tccDriver() const
|
||||
#endif
|
||||
}
|
||||
|
||||
int cv::gpu::DeviceInfo::asyncEngineCount() const
|
||||
int cv::cuda::DeviceInfo::asyncEngineCount() const
|
||||
{
|
||||
#ifndef HAVE_CUDA
|
||||
throw_no_cuda();
|
||||
@@ -833,7 +833,7 @@ int cv::gpu::DeviceInfo::asyncEngineCount() const
|
||||
#endif
|
||||
}
|
||||
|
||||
bool cv::gpu::DeviceInfo::unifiedAddressing() const
|
||||
bool cv::cuda::DeviceInfo::unifiedAddressing() const
|
||||
{
|
||||
#ifndef HAVE_CUDA
|
||||
throw_no_cuda();
|
||||
@@ -843,7 +843,7 @@ bool cv::gpu::DeviceInfo::unifiedAddressing() const
|
||||
#endif
|
||||
}
|
||||
|
||||
int cv::gpu::DeviceInfo::memoryClockRate() const
|
||||
int cv::cuda::DeviceInfo::memoryClockRate() const
|
||||
{
|
||||
#ifndef HAVE_CUDA
|
||||
throw_no_cuda();
|
||||
@@ -853,7 +853,7 @@ int cv::gpu::DeviceInfo::memoryClockRate() const
|
||||
#endif
|
||||
}
|
||||
|
||||
int cv::gpu::DeviceInfo::memoryBusWidth() const
|
||||
int cv::cuda::DeviceInfo::memoryBusWidth() const
|
||||
{
|
||||
#ifndef HAVE_CUDA
|
||||
throw_no_cuda();
|
||||
@@ -863,7 +863,7 @@ int cv::gpu::DeviceInfo::memoryBusWidth() const
|
||||
#endif
|
||||
}
|
||||
|
||||
int cv::gpu::DeviceInfo::l2CacheSize() const
|
||||
int cv::cuda::DeviceInfo::l2CacheSize() const
|
||||
{
|
||||
#ifndef HAVE_CUDA
|
||||
throw_no_cuda();
|
||||
@@ -873,7 +873,7 @@ int cv::gpu::DeviceInfo::l2CacheSize() const
|
||||
#endif
|
||||
}
|
||||
|
||||
int cv::gpu::DeviceInfo::maxThreadsPerMultiProcessor() const
|
||||
int cv::cuda::DeviceInfo::maxThreadsPerMultiProcessor() const
|
||||
{
|
||||
#ifndef HAVE_CUDA
|
||||
throw_no_cuda();
|
||||
@@ -883,7 +883,7 @@ int cv::gpu::DeviceInfo::maxThreadsPerMultiProcessor() const
|
||||
#endif
|
||||
}
|
||||
|
||||
void cv::gpu::DeviceInfo::queryMemory(size_t& _totalMemory, size_t& _freeMemory) const
|
||||
void cv::cuda::DeviceInfo::queryMemory(size_t& _totalMemory, size_t& _freeMemory) const
|
||||
{
|
||||
#ifndef HAVE_CUDA
|
||||
(void) _totalMemory;
|
||||
@@ -901,7 +901,7 @@ void cv::gpu::DeviceInfo::queryMemory(size_t& _totalMemory, size_t& _freeMemory)
|
||||
#endif
|
||||
}
|
||||
|
||||
bool cv::gpu::DeviceInfo::isCompatible() const
|
||||
bool cv::cuda::DeviceInfo::isCompatible() const
|
||||
{
|
||||
#ifndef HAVE_CUDA
|
||||
throw_no_cuda();
|
||||
@@ -951,7 +951,7 @@ namespace
|
||||
|
||||
#endif
|
||||
|
||||
void cv::gpu::printCudaDeviceInfo(int device)
|
||||
void cv::cuda::printCudaDeviceInfo(int device)
|
||||
{
|
||||
#ifndef HAVE_CUDA
|
||||
(void) device;
|
||||
@@ -1037,7 +1037,7 @@ void cv::gpu::printCudaDeviceInfo(int device)
|
||||
#endif
|
||||
}
|
||||
|
||||
void cv::gpu::printShortCudaDeviceInfo(int device)
|
||||
void cv::cuda::printShortCudaDeviceInfo(int device)
|
||||
{
|
||||
#ifndef HAVE_CUDA
|
||||
(void) device;
|
||||
@@ -1251,7 +1251,7 @@ namespace
|
||||
|
||||
#endif
|
||||
|
||||
String cv::gpu::getNppErrorMessage(int code)
|
||||
String cv::cuda::getNppErrorMessage(int code)
|
||||
{
|
||||
#ifndef HAVE_CUDA
|
||||
(void) code;
|
||||
@@ -1261,7 +1261,7 @@ String cv::gpu::getNppErrorMessage(int code)
|
||||
#endif
|
||||
}
|
||||
|
||||
String cv::gpu::getCudaDriverApiErrorMessage(int code)
|
||||
String cv::cuda::getCudaDriverApiErrorMessage(int code)
|
||||
{
|
||||
#ifndef HAVE_CUDA
|
||||
(void) code;
|
||||
|
||||
@@ -44,9 +44,9 @@
|
||||
#include "precomp.hpp"
|
||||
|
||||
using namespace cv;
|
||||
using namespace cv::gpu;
|
||||
using namespace cv::cuda;
|
||||
|
||||
cv::gpu::GpuMat::GpuMat(int rows_, int cols_, int type_, void* data_, size_t step_) :
|
||||
cv::cuda::GpuMat::GpuMat(int rows_, int cols_, int type_, void* data_, size_t step_) :
|
||||
flags(Mat::MAGIC_VAL + (type_ & Mat::TYPE_MASK)), rows(rows_), cols(cols_),
|
||||
step(step_), data((uchar*)data_), refcount(0),
|
||||
datastart((uchar*)data_), dataend((uchar*)data_)
|
||||
@@ -71,7 +71,7 @@ cv::gpu::GpuMat::GpuMat(int rows_, int cols_, int type_, void* data_, size_t ste
|
||||
dataend += step * (rows - 1) + minstep;
|
||||
}
|
||||
|
||||
cv::gpu::GpuMat::GpuMat(Size size_, int type_, void* data_, size_t step_) :
|
||||
cv::cuda::GpuMat::GpuMat(Size size_, int type_, void* data_, size_t step_) :
|
||||
flags(Mat::MAGIC_VAL + (type_ & Mat::TYPE_MASK)), rows(size_.height), cols(size_.width),
|
||||
step(step_), data((uchar*)data_), refcount(0),
|
||||
datastart((uchar*)data_), dataend((uchar*)data_)
|
||||
@@ -95,7 +95,7 @@ cv::gpu::GpuMat::GpuMat(Size size_, int type_, void* data_, size_t step_) :
|
||||
dataend += step * (rows - 1) + minstep;
|
||||
}
|
||||
|
||||
cv::gpu::GpuMat::GpuMat(const GpuMat& m, Range rowRange_, Range colRange_)
|
||||
cv::cuda::GpuMat::GpuMat(const GpuMat& m, Range rowRange_, Range colRange_)
|
||||
{
|
||||
flags = m.flags;
|
||||
step = m.step; refcount = m.refcount;
|
||||
@@ -136,7 +136,7 @@ cv::gpu::GpuMat::GpuMat(const GpuMat& m, Range rowRange_, Range colRange_)
|
||||
rows = cols = 0;
|
||||
}
|
||||
|
||||
cv::gpu::GpuMat::GpuMat(const GpuMat& m, Rect roi) :
|
||||
cv::cuda::GpuMat::GpuMat(const GpuMat& m, Rect roi) :
|
||||
flags(m.flags), rows(roi.height), cols(roi.width),
|
||||
step(m.step), data(m.data + roi.y*step), refcount(m.refcount),
|
||||
datastart(m.datastart), dataend(m.dataend)
|
||||
@@ -153,7 +153,7 @@ cv::gpu::GpuMat::GpuMat(const GpuMat& m, Rect roi) :
|
||||
rows = cols = 0;
|
||||
}
|
||||
|
||||
GpuMat cv::gpu::GpuMat::reshape(int new_cn, int new_rows) const
|
||||
GpuMat cv::cuda::GpuMat::reshape(int new_cn, int new_rows) const
|
||||
{
|
||||
GpuMat hdr = *this;
|
||||
|
||||
@@ -196,7 +196,7 @@ GpuMat cv::gpu::GpuMat::reshape(int new_cn, int new_rows) const
|
||||
return hdr;
|
||||
}
|
||||
|
||||
void cv::gpu::GpuMat::locateROI(Size& wholeSize, Point& ofs) const
|
||||
void cv::cuda::GpuMat::locateROI(Size& wholeSize, Point& ofs) const
|
||||
{
|
||||
CV_DbgAssert( step > 0 );
|
||||
|
||||
@@ -222,7 +222,7 @@ void cv::gpu::GpuMat::locateROI(Size& wholeSize, Point& ofs) const
|
||||
wholeSize.width = std::max(static_cast<int>((delta2 - step * (wholeSize.height - 1)) / esz), ofs.x + cols);
|
||||
}
|
||||
|
||||
GpuMat& cv::gpu::GpuMat::adjustROI(int dtop, int dbottom, int dleft, int dright)
|
||||
GpuMat& cv::cuda::GpuMat::adjustROI(int dtop, int dbottom, int dleft, int dright)
|
||||
{
|
||||
Size wholeSize;
|
||||
Point ofs;
|
||||
@@ -262,7 +262,7 @@ namespace
|
||||
}
|
||||
}
|
||||
|
||||
void cv::gpu::createContinuous(int rows, int cols, int type, OutputArray arr)
|
||||
void cv::cuda::createContinuous(int rows, int cols, int type, OutputArray arr)
|
||||
{
|
||||
switch (arr.kind())
|
||||
{
|
||||
@@ -316,7 +316,7 @@ namespace
|
||||
}
|
||||
}
|
||||
|
||||
void cv::gpu::ensureSizeIsEnough(int rows, int cols, int type, OutputArray arr)
|
||||
void cv::cuda::ensureSizeIsEnough(int rows, int cols, int type, OutputArray arr)
|
||||
{
|
||||
switch (arr.kind())
|
||||
{
|
||||
@@ -337,7 +337,7 @@ void cv::gpu::ensureSizeIsEnough(int rows, int cols, int type, OutputArray arr)
|
||||
}
|
||||
}
|
||||
|
||||
GpuMat cv::gpu::allocMatFromBuf(int rows, int cols, int type, GpuMat& mat)
|
||||
GpuMat cv::cuda::allocMatFromBuf(int rows, int cols, int type, GpuMat& mat)
|
||||
{
|
||||
if (!mat.empty() && mat.type() == type && mat.rows >= rows && mat.cols >= cols)
|
||||
return mat(Rect(0, 0, cols, rows));
|
||||
@@ -347,7 +347,7 @@ GpuMat cv::gpu::allocMatFromBuf(int rows, int cols, int type, GpuMat& mat)
|
||||
|
||||
#ifndef HAVE_CUDA
|
||||
|
||||
void cv::gpu::GpuMat::create(int _rows, int _cols, int _type)
|
||||
void cv::cuda::GpuMat::create(int _rows, int _cols, int _type)
|
||||
{
|
||||
(void) _rows;
|
||||
(void) _cols;
|
||||
@@ -355,50 +355,50 @@ void cv::gpu::GpuMat::create(int _rows, int _cols, int _type)
|
||||
throw_no_cuda();
|
||||
}
|
||||
|
||||
void cv::gpu::GpuMat::release()
|
||||
void cv::cuda::GpuMat::release()
|
||||
{
|
||||
}
|
||||
|
||||
void cv::gpu::GpuMat::upload(InputArray arr)
|
||||
void cv::cuda::GpuMat::upload(InputArray arr)
|
||||
{
|
||||
(void) arr;
|
||||
throw_no_cuda();
|
||||
}
|
||||
|
||||
void cv::gpu::GpuMat::upload(InputArray arr, Stream& _stream)
|
||||
void cv::cuda::GpuMat::upload(InputArray arr, Stream& _stream)
|
||||
{
|
||||
(void) arr;
|
||||
(void) _stream;
|
||||
throw_no_cuda();
|
||||
}
|
||||
|
||||
void cv::gpu::GpuMat::download(OutputArray _dst) const
|
||||
void cv::cuda::GpuMat::download(OutputArray _dst) const
|
||||
{
|
||||
(void) _dst;
|
||||
throw_no_cuda();
|
||||
}
|
||||
|
||||
void cv::gpu::GpuMat::download(OutputArray _dst, Stream& _stream) const
|
||||
void cv::cuda::GpuMat::download(OutputArray _dst, Stream& _stream) const
|
||||
{
|
||||
(void) _dst;
|
||||
(void) _stream;
|
||||
throw_no_cuda();
|
||||
}
|
||||
|
||||
void cv::gpu::GpuMat::copyTo(OutputArray _dst) const
|
||||
void cv::cuda::GpuMat::copyTo(OutputArray _dst) const
|
||||
{
|
||||
(void) _dst;
|
||||
throw_no_cuda();
|
||||
}
|
||||
|
||||
void cv::gpu::GpuMat::copyTo(OutputArray _dst, Stream& _stream) const
|
||||
void cv::cuda::GpuMat::copyTo(OutputArray _dst, Stream& _stream) const
|
||||
{
|
||||
(void) _dst;
|
||||
(void) _stream;
|
||||
throw_no_cuda();
|
||||
}
|
||||
|
||||
void cv::gpu::GpuMat::copyTo(OutputArray _dst, InputArray _mask, Stream& _stream) const
|
||||
void cv::cuda::GpuMat::copyTo(OutputArray _dst, InputArray _mask, Stream& _stream) const
|
||||
{
|
||||
(void) _dst;
|
||||
(void) _mask;
|
||||
@@ -406,7 +406,7 @@ void cv::gpu::GpuMat::copyTo(OutputArray _dst, InputArray _mask, Stream& _stream
|
||||
throw_no_cuda();
|
||||
}
|
||||
|
||||
GpuMat& cv::gpu::GpuMat::setTo(Scalar s, Stream& _stream)
|
||||
GpuMat& cv::cuda::GpuMat::setTo(Scalar s, Stream& _stream)
|
||||
{
|
||||
(void) s;
|
||||
(void) _stream;
|
||||
@@ -414,7 +414,7 @@ GpuMat& cv::gpu::GpuMat::setTo(Scalar s, Stream& _stream)
|
||||
return *this;
|
||||
}
|
||||
|
||||
GpuMat& cv::gpu::GpuMat::setTo(Scalar s, InputArray _mask, Stream& _stream)
|
||||
GpuMat& cv::cuda::GpuMat::setTo(Scalar s, InputArray _mask, Stream& _stream)
|
||||
{
|
||||
(void) s;
|
||||
(void) _mask;
|
||||
@@ -423,7 +423,7 @@ GpuMat& cv::gpu::GpuMat::setTo(Scalar s, InputArray _mask, Stream& _stream)
|
||||
return *this;
|
||||
}
|
||||
|
||||
void cv::gpu::GpuMat::convertTo(OutputArray _dst, int rtype, Stream& _stream) const
|
||||
void cv::cuda::GpuMat::convertTo(OutputArray _dst, int rtype, Stream& _stream) const
|
||||
{
|
||||
(void) _dst;
|
||||
(void) rtype;
|
||||
@@ -431,7 +431,7 @@ void cv::gpu::GpuMat::convertTo(OutputArray _dst, int rtype, Stream& _stream) co
|
||||
throw_no_cuda();
|
||||
}
|
||||
|
||||
void cv::gpu::GpuMat::convertTo(OutputArray _dst, int rtype, double alpha, double beta, Stream& _stream) const
|
||||
void cv::cuda::GpuMat::convertTo(OutputArray _dst, int rtype, double alpha, double beta, Stream& _stream) const
|
||||
{
|
||||
(void) _dst;
|
||||
(void) rtype;
|
||||
|
||||
@@ -43,14 +43,14 @@
|
||||
#include "precomp.hpp"
|
||||
|
||||
using namespace cv;
|
||||
using namespace cv::gpu;
|
||||
using namespace cv::cuda;
|
||||
|
||||
////////////////////////////////////////////////////////////////
|
||||
// Stream
|
||||
|
||||
#ifndef HAVE_CUDA
|
||||
|
||||
class cv::gpu::Stream::Impl
|
||||
class cv::cuda::Stream::Impl
|
||||
{
|
||||
public:
|
||||
Impl(void* ptr = 0)
|
||||
@@ -62,7 +62,7 @@ public:
|
||||
|
||||
#else
|
||||
|
||||
class cv::gpu::Stream::Impl
|
||||
class cv::cuda::Stream::Impl
|
||||
{
|
||||
public:
|
||||
cudaStream_t stream;
|
||||
@@ -73,29 +73,29 @@ public:
|
||||
~Impl();
|
||||
};
|
||||
|
||||
cv::gpu::Stream::Impl::Impl() : stream(0)
|
||||
cv::cuda::Stream::Impl::Impl() : stream(0)
|
||||
{
|
||||
cudaSafeCall( cudaStreamCreate(&stream) );
|
||||
}
|
||||
|
||||
cv::gpu::Stream::Impl::Impl(cudaStream_t stream_) : stream(stream_)
|
||||
cv::cuda::Stream::Impl::Impl(cudaStream_t stream_) : stream(stream_)
|
||||
{
|
||||
}
|
||||
|
||||
cv::gpu::Stream::Impl::~Impl()
|
||||
cv::cuda::Stream::Impl::~Impl()
|
||||
{
|
||||
if (stream)
|
||||
cudaStreamDestroy(stream);
|
||||
}
|
||||
|
||||
cudaStream_t cv::gpu::StreamAccessor::getStream(const Stream& stream)
|
||||
cudaStream_t cv::cuda::StreamAccessor::getStream(const Stream& stream)
|
||||
{
|
||||
return stream.impl_->stream;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
cv::gpu::Stream::Stream()
|
||||
cv::cuda::Stream::Stream()
|
||||
{
|
||||
#ifndef HAVE_CUDA
|
||||
throw_no_cuda();
|
||||
@@ -104,7 +104,7 @@ cv::gpu::Stream::Stream()
|
||||
#endif
|
||||
}
|
||||
|
||||
bool cv::gpu::Stream::queryIfComplete() const
|
||||
bool cv::cuda::Stream::queryIfComplete() const
|
||||
{
|
||||
#ifndef HAVE_CUDA
|
||||
throw_no_cuda();
|
||||
@@ -120,7 +120,7 @@ bool cv::gpu::Stream::queryIfComplete() const
|
||||
#endif
|
||||
}
|
||||
|
||||
void cv::gpu::Stream::waitForCompletion()
|
||||
void cv::cuda::Stream::waitForCompletion()
|
||||
{
|
||||
#ifndef HAVE_CUDA
|
||||
throw_no_cuda();
|
||||
@@ -129,7 +129,7 @@ void cv::gpu::Stream::waitForCompletion()
|
||||
#endif
|
||||
}
|
||||
|
||||
void cv::gpu::Stream::waitEvent(const Event& event)
|
||||
void cv::cuda::Stream::waitEvent(const Event& event)
|
||||
{
|
||||
#ifndef HAVE_CUDA
|
||||
(void) event;
|
||||
@@ -161,7 +161,7 @@ namespace
|
||||
|
||||
#endif
|
||||
|
||||
void cv::gpu::Stream::enqueueHostCallback(StreamCallback callback, void* userData)
|
||||
void cv::cuda::Stream::enqueueHostCallback(StreamCallback callback, void* userData)
|
||||
{
|
||||
#ifndef HAVE_CUDA
|
||||
(void) callback;
|
||||
@@ -180,13 +180,13 @@ void cv::gpu::Stream::enqueueHostCallback(StreamCallback callback, void* userDat
|
||||
#endif
|
||||
}
|
||||
|
||||
Stream& cv::gpu::Stream::Null()
|
||||
Stream& cv::cuda::Stream::Null()
|
||||
{
|
||||
static Stream s(new Impl(0));
|
||||
return s;
|
||||
}
|
||||
|
||||
cv::gpu::Stream::operator bool_type() const
|
||||
cv::cuda::Stream::operator bool_type() const
|
||||
{
|
||||
#ifndef HAVE_CUDA
|
||||
return 0;
|
||||
@@ -205,7 +205,7 @@ template <> void cv::Ptr<Stream::Impl>::delete_obj()
|
||||
|
||||
#ifndef HAVE_CUDA
|
||||
|
||||
class cv::gpu::Event::Impl
|
||||
class cv::cuda::Event::Impl
|
||||
{
|
||||
public:
|
||||
Impl(unsigned int)
|
||||
@@ -216,7 +216,7 @@ public:
|
||||
|
||||
#else
|
||||
|
||||
class cv::gpu::Event::Impl
|
||||
class cv::cuda::Event::Impl
|
||||
{
|
||||
public:
|
||||
cudaEvent_t event;
|
||||
@@ -225,25 +225,25 @@ public:
|
||||
~Impl();
|
||||
};
|
||||
|
||||
cv::gpu::Event::Impl::Impl(unsigned int flags) : event(0)
|
||||
cv::cuda::Event::Impl::Impl(unsigned int flags) : event(0)
|
||||
{
|
||||
cudaSafeCall( cudaEventCreateWithFlags(&event, flags) );
|
||||
}
|
||||
|
||||
cv::gpu::Event::Impl::~Impl()
|
||||
cv::cuda::Event::Impl::~Impl()
|
||||
{
|
||||
if (event)
|
||||
cudaEventDestroy(event);
|
||||
}
|
||||
|
||||
cudaEvent_t cv::gpu::EventAccessor::getEvent(const Event& event)
|
||||
cudaEvent_t cv::cuda::EventAccessor::getEvent(const Event& event)
|
||||
{
|
||||
return event.impl_->event;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
cv::gpu::Event::Event(CreateFlags flags)
|
||||
cv::cuda::Event::Event(CreateFlags flags)
|
||||
{
|
||||
#ifndef HAVE_CUDA
|
||||
(void) flags;
|
||||
@@ -253,7 +253,7 @@ cv::gpu::Event::Event(CreateFlags flags)
|
||||
#endif
|
||||
}
|
||||
|
||||
void cv::gpu::Event::record(Stream& stream)
|
||||
void cv::cuda::Event::record(Stream& stream)
|
||||
{
|
||||
#ifndef HAVE_CUDA
|
||||
(void) stream;
|
||||
@@ -263,7 +263,7 @@ void cv::gpu::Event::record(Stream& stream)
|
||||
#endif
|
||||
}
|
||||
|
||||
bool cv::gpu::Event::queryIfComplete() const
|
||||
bool cv::cuda::Event::queryIfComplete() const
|
||||
{
|
||||
#ifndef HAVE_CUDA
|
||||
throw_no_cuda();
|
||||
@@ -279,7 +279,7 @@ bool cv::gpu::Event::queryIfComplete() const
|
||||
#endif
|
||||
}
|
||||
|
||||
void cv::gpu::Event::waitForCompletion()
|
||||
void cv::cuda::Event::waitForCompletion()
|
||||
{
|
||||
#ifndef HAVE_CUDA
|
||||
throw_no_cuda();
|
||||
@@ -288,7 +288,7 @@ void cv::gpu::Event::waitForCompletion()
|
||||
#endif
|
||||
}
|
||||
|
||||
float cv::gpu::Event::elapsedTime(const Event& start, const Event& end)
|
||||
float cv::cuda::Event::elapsedTime(const Event& start, const Event& end)
|
||||
{
|
||||
#ifndef HAVE_CUDA
|
||||
(void) start;
|
||||
|
||||
+39
-39
@@ -943,9 +943,9 @@ _InputArray::_InputArray(const Mat& m) : flags(MAT), obj((void*)&m) {}
|
||||
_InputArray::_InputArray(const std::vector<Mat>& vec) : flags(STD_VECTOR_MAT), obj((void*)&vec) {}
|
||||
_InputArray::_InputArray(const double& val) : flags(FIXED_TYPE + FIXED_SIZE + MATX + CV_64F), obj((void*)&val), sz(Size(1,1)) {}
|
||||
_InputArray::_InputArray(const MatExpr& expr) : flags(FIXED_TYPE + FIXED_SIZE + EXPR), obj((void*)&expr) {}
|
||||
_InputArray::_InputArray(const gpu::GpuMat& d_mat) : flags(GPU_MAT), obj((void*)&d_mat) {}
|
||||
_InputArray::_InputArray(const cuda::GpuMat& d_mat) : flags(GPU_MAT), obj((void*)&d_mat) {}
|
||||
_InputArray::_InputArray(const ogl::Buffer& buf) : flags(OPENGL_BUFFER), obj((void*)&buf) {}
|
||||
_InputArray::_InputArray(const gpu::CudaMem& cuda_mem) : flags(CUDA_MEM), obj((void*)&cuda_mem) {}
|
||||
_InputArray::_InputArray(const cuda::CudaMem& cuda_mem) : flags(CUDA_MEM), obj((void*)&cuda_mem) {}
|
||||
|
||||
_InputArray::~_InputArray() {}
|
||||
|
||||
@@ -1018,7 +1018,7 @@ Mat _InputArray::getMat(int i) const
|
||||
if( k == GPU_MAT )
|
||||
{
|
||||
CV_Assert( i < 0 );
|
||||
CV_Error(cv::Error::StsNotImplemented, "You should explicitly call download method for gpu::GpuMat object");
|
||||
CV_Error(cv::Error::StsNotImplemented, "You should explicitly call download method for cuda::GpuMat object");
|
||||
return Mat();
|
||||
}
|
||||
|
||||
@@ -1027,7 +1027,7 @@ Mat _InputArray::getMat(int i) const
|
||||
{
|
||||
CV_Assert( i < 0 );
|
||||
|
||||
const gpu::CudaMem* cuda_mem = (const gpu::CudaMem*)obj;
|
||||
const cuda::CudaMem* cuda_mem = (const cuda::CudaMem*)obj;
|
||||
|
||||
return cuda_mem->createMatHeader();
|
||||
}
|
||||
@@ -1120,33 +1120,33 @@ void _InputArray::getMatVector(std::vector<Mat>& mv) const
|
||||
}
|
||||
}
|
||||
|
||||
gpu::GpuMat _InputArray::getGpuMat() const
|
||||
cuda::GpuMat _InputArray::getGpuMat() const
|
||||
{
|
||||
int k = kind();
|
||||
|
||||
if (k == GPU_MAT)
|
||||
{
|
||||
const gpu::GpuMat* d_mat = (const gpu::GpuMat*)obj;
|
||||
const cuda::GpuMat* d_mat = (const cuda::GpuMat*)obj;
|
||||
return *d_mat;
|
||||
}
|
||||
|
||||
if (k == CUDA_MEM)
|
||||
{
|
||||
const gpu::CudaMem* cuda_mem = (const gpu::CudaMem*)obj;
|
||||
const cuda::CudaMem* cuda_mem = (const cuda::CudaMem*)obj;
|
||||
return cuda_mem->createGpuMatHeader();
|
||||
}
|
||||
|
||||
if (k == OPENGL_BUFFER)
|
||||
{
|
||||
CV_Error(cv::Error::StsNotImplemented, "You should explicitly call mapDevice/unmapDevice methods for ogl::Buffer object");
|
||||
return gpu::GpuMat();
|
||||
return cuda::GpuMat();
|
||||
}
|
||||
|
||||
if (k == NONE)
|
||||
return gpu::GpuMat();
|
||||
return cuda::GpuMat();
|
||||
|
||||
CV_Error(cv::Error::StsNotImplemented, "getGpuMat is available only for gpu::GpuMat and gpu::CudaMem");
|
||||
return gpu::GpuMat();
|
||||
CV_Error(cv::Error::StsNotImplemented, "getGpuMat is available only for cuda::GpuMat and cuda::CudaMem");
|
||||
return cuda::GpuMat();
|
||||
}
|
||||
|
||||
ogl::Buffer _InputArray::getOGlBuffer() const
|
||||
@@ -1230,7 +1230,7 @@ Size _InputArray::size(int i) const
|
||||
if( k == GPU_MAT )
|
||||
{
|
||||
CV_Assert( i < 0 );
|
||||
const gpu::GpuMat* d_mat = (const gpu::GpuMat*)obj;
|
||||
const cuda::GpuMat* d_mat = (const cuda::GpuMat*)obj;
|
||||
return d_mat->size();
|
||||
}
|
||||
|
||||
@@ -1243,7 +1243,7 @@ Size _InputArray::size(int i) const
|
||||
//if( k == CUDA_MEM )
|
||||
{
|
||||
CV_Assert( i < 0 );
|
||||
const gpu::CudaMem* cuda_mem = (const gpu::CudaMem*)obj;
|
||||
const cuda::CudaMem* cuda_mem = (const cuda::CudaMem*)obj;
|
||||
return cuda_mem->size();
|
||||
}
|
||||
}
|
||||
@@ -1299,11 +1299,11 @@ int _InputArray::type(int i) const
|
||||
return ((const ogl::Buffer*)obj)->type();
|
||||
|
||||
if( k == GPU_MAT )
|
||||
return ((const gpu::GpuMat*)obj)->type();
|
||||
return ((const cuda::GpuMat*)obj)->type();
|
||||
|
||||
CV_Assert( k == CUDA_MEM );
|
||||
//if( k == CUDA_MEM )
|
||||
return ((const gpu::CudaMem*)obj)->type();
|
||||
return ((const cuda::CudaMem*)obj)->type();
|
||||
}
|
||||
|
||||
int _InputArray::depth(int i) const
|
||||
@@ -1359,26 +1359,26 @@ bool _InputArray::empty() const
|
||||
}
|
||||
|
||||
if( k == GPU_MAT )
|
||||
return ((const gpu::GpuMat*)obj)->empty();
|
||||
return ((const cuda::GpuMat*)obj)->empty();
|
||||
|
||||
CV_Assert( k == CUDA_MEM );
|
||||
//if( k == CUDA_MEM )
|
||||
return ((const gpu::CudaMem*)obj)->empty();
|
||||
return ((const cuda::CudaMem*)obj)->empty();
|
||||
}
|
||||
|
||||
|
||||
_OutputArray::_OutputArray() {}
|
||||
_OutputArray::_OutputArray(Mat& m) : _InputArray(m) {}
|
||||
_OutputArray::_OutputArray(std::vector<Mat>& vec) : _InputArray(vec) {}
|
||||
_OutputArray::_OutputArray(gpu::GpuMat& d_mat) : _InputArray(d_mat) {}
|
||||
_OutputArray::_OutputArray(cuda::GpuMat& d_mat) : _InputArray(d_mat) {}
|
||||
_OutputArray::_OutputArray(ogl::Buffer& buf) : _InputArray(buf) {}
|
||||
_OutputArray::_OutputArray(gpu::CudaMem& cuda_mem) : _InputArray(cuda_mem) {}
|
||||
_OutputArray::_OutputArray(cuda::CudaMem& cuda_mem) : _InputArray(cuda_mem) {}
|
||||
|
||||
_OutputArray::_OutputArray(const Mat& m) : _InputArray(m) {flags |= FIXED_SIZE|FIXED_TYPE;}
|
||||
_OutputArray::_OutputArray(const std::vector<Mat>& vec) : _InputArray(vec) {flags |= FIXED_SIZE;}
|
||||
_OutputArray::_OutputArray(const gpu::GpuMat& d_mat) : _InputArray(d_mat) {flags |= FIXED_SIZE|FIXED_TYPE;}
|
||||
_OutputArray::_OutputArray(const cuda::GpuMat& d_mat) : _InputArray(d_mat) {flags |= FIXED_SIZE|FIXED_TYPE;}
|
||||
_OutputArray::_OutputArray(const ogl::Buffer& buf) : _InputArray(buf) {flags |= FIXED_SIZE|FIXED_TYPE;}
|
||||
_OutputArray::_OutputArray(const gpu::CudaMem& cuda_mem) : _InputArray(cuda_mem) {flags |= FIXED_SIZE|FIXED_TYPE;}
|
||||
_OutputArray::_OutputArray(const cuda::CudaMem& cuda_mem) : _InputArray(cuda_mem) {flags |= FIXED_SIZE|FIXED_TYPE;}
|
||||
|
||||
_OutputArray::~_OutputArray() {}
|
||||
|
||||
@@ -1404,9 +1404,9 @@ void _OutputArray::create(Size _sz, int mtype, int i, bool allowTransposed, int
|
||||
}
|
||||
if( k == GPU_MAT && i < 0 && !allowTransposed && fixedDepthMask == 0 )
|
||||
{
|
||||
CV_Assert(!fixedSize() || ((gpu::GpuMat*)obj)->size() == _sz);
|
||||
CV_Assert(!fixedType() || ((gpu::GpuMat*)obj)->type() == mtype);
|
||||
((gpu::GpuMat*)obj)->create(_sz, mtype);
|
||||
CV_Assert(!fixedSize() || ((cuda::GpuMat*)obj)->size() == _sz);
|
||||
CV_Assert(!fixedType() || ((cuda::GpuMat*)obj)->type() == mtype);
|
||||
((cuda::GpuMat*)obj)->create(_sz, mtype);
|
||||
return;
|
||||
}
|
||||
if( k == OPENGL_BUFFER && i < 0 && !allowTransposed && fixedDepthMask == 0 )
|
||||
@@ -1418,9 +1418,9 @@ void _OutputArray::create(Size _sz, int mtype, int i, bool allowTransposed, int
|
||||
}
|
||||
if( k == CUDA_MEM && i < 0 && !allowTransposed && fixedDepthMask == 0 )
|
||||
{
|
||||
CV_Assert(!fixedSize() || ((gpu::CudaMem*)obj)->size() == _sz);
|
||||
CV_Assert(!fixedType() || ((gpu::CudaMem*)obj)->type() == mtype);
|
||||
((gpu::CudaMem*)obj)->create(_sz, mtype);
|
||||
CV_Assert(!fixedSize() || ((cuda::CudaMem*)obj)->size() == _sz);
|
||||
CV_Assert(!fixedType() || ((cuda::CudaMem*)obj)->type() == mtype);
|
||||
((cuda::CudaMem*)obj)->create(_sz, mtype);
|
||||
return;
|
||||
}
|
||||
int sizes[] = {_sz.height, _sz.width};
|
||||
@@ -1439,9 +1439,9 @@ void _OutputArray::create(int rows, int cols, int mtype, int i, bool allowTransp
|
||||
}
|
||||
if( k == GPU_MAT && i < 0 && !allowTransposed && fixedDepthMask == 0 )
|
||||
{
|
||||
CV_Assert(!fixedSize() || ((gpu::GpuMat*)obj)->size() == Size(cols, rows));
|
||||
CV_Assert(!fixedType() || ((gpu::GpuMat*)obj)->type() == mtype);
|
||||
((gpu::GpuMat*)obj)->create(rows, cols, mtype);
|
||||
CV_Assert(!fixedSize() || ((cuda::GpuMat*)obj)->size() == Size(cols, rows));
|
||||
CV_Assert(!fixedType() || ((cuda::GpuMat*)obj)->type() == mtype);
|
||||
((cuda::GpuMat*)obj)->create(rows, cols, mtype);
|
||||
return;
|
||||
}
|
||||
if( k == OPENGL_BUFFER && i < 0 && !allowTransposed && fixedDepthMask == 0 )
|
||||
@@ -1453,9 +1453,9 @@ void _OutputArray::create(int rows, int cols, int mtype, int i, bool allowTransp
|
||||
}
|
||||
if( k == CUDA_MEM && i < 0 && !allowTransposed && fixedDepthMask == 0 )
|
||||
{
|
||||
CV_Assert(!fixedSize() || ((gpu::CudaMem*)obj)->size() == Size(cols, rows));
|
||||
CV_Assert(!fixedType() || ((gpu::CudaMem*)obj)->type() == mtype);
|
||||
((gpu::CudaMem*)obj)->create(rows, cols, mtype);
|
||||
CV_Assert(!fixedSize() || ((cuda::CudaMem*)obj)->size() == Size(cols, rows));
|
||||
CV_Assert(!fixedType() || ((cuda::CudaMem*)obj)->type() == mtype);
|
||||
((cuda::CudaMem*)obj)->create(rows, cols, mtype);
|
||||
return;
|
||||
}
|
||||
int sizes[] = {rows, cols};
|
||||
@@ -1678,13 +1678,13 @@ void _OutputArray::release() const
|
||||
|
||||
if( k == GPU_MAT )
|
||||
{
|
||||
((gpu::GpuMat*)obj)->release();
|
||||
((cuda::GpuMat*)obj)->release();
|
||||
return;
|
||||
}
|
||||
|
||||
if( k == CUDA_MEM )
|
||||
{
|
||||
((gpu::CudaMem*)obj)->release();
|
||||
((cuda::CudaMem*)obj)->release();
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -1757,11 +1757,11 @@ Mat& _OutputArray::getMatRef(int i) const
|
||||
}
|
||||
}
|
||||
|
||||
gpu::GpuMat& _OutputArray::getGpuMatRef() const
|
||||
cuda::GpuMat& _OutputArray::getGpuMatRef() const
|
||||
{
|
||||
int k = kind();
|
||||
CV_Assert( k == GPU_MAT );
|
||||
return *(gpu::GpuMat*)obj;
|
||||
return *(cuda::GpuMat*)obj;
|
||||
}
|
||||
|
||||
ogl::Buffer& _OutputArray::getOGlBufferRef() const
|
||||
@@ -1771,11 +1771,11 @@ ogl::Buffer& _OutputArray::getOGlBufferRef() const
|
||||
return *(ogl::Buffer*)obj;
|
||||
}
|
||||
|
||||
gpu::CudaMem& _OutputArray::getCudaMemRef() const
|
||||
cuda::CudaMem& _OutputArray::getCudaMemRef() const
|
||||
{
|
||||
int k = kind();
|
||||
CV_Assert( k == CUDA_MEM );
|
||||
return *(gpu::CudaMem*)obj;
|
||||
return *(cuda::CudaMem*)obj;
|
||||
}
|
||||
|
||||
static _OutputArray _none;
|
||||
|
||||
+10
-10
@@ -50,7 +50,7 @@
|
||||
#endif
|
||||
|
||||
using namespace cv;
|
||||
using namespace cv::gpu;
|
||||
using namespace cv::cuda;
|
||||
|
||||
namespace
|
||||
{
|
||||
@@ -122,7 +122,7 @@ namespace
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
// setGlDevice
|
||||
|
||||
void cv::gpu::setGlDevice(int device)
|
||||
void cv::cuda::setGlDevice(int device)
|
||||
{
|
||||
#ifndef HAVE_OPENGL
|
||||
(void) device;
|
||||
@@ -627,7 +627,7 @@ void cv::ogl::Buffer::copyFrom(InputArray arr, Target target, bool autoRelease)
|
||||
#endif
|
||||
}
|
||||
|
||||
void cv::ogl::Buffer::copyFrom(InputArray arr, gpu::Stream& stream, Target target, bool autoRelease)
|
||||
void cv::ogl::Buffer::copyFrom(InputArray arr, cuda::Stream& stream, Target target, bool autoRelease)
|
||||
{
|
||||
#ifndef HAVE_OPENGL
|
||||
(void) arr;
|
||||
@@ -647,7 +647,7 @@ void cv::ogl::Buffer::copyFrom(InputArray arr, gpu::Stream& stream, Target targe
|
||||
|
||||
create(dmat.size(), dmat.type(), target, autoRelease);
|
||||
|
||||
impl_->copyFrom(dmat.data, dmat.step, dmat.cols * dmat.elemSize(), dmat.rows, gpu::StreamAccessor::getStream(stream));
|
||||
impl_->copyFrom(dmat.data, dmat.step, dmat.cols * dmat.elemSize(), dmat.rows, cuda::StreamAccessor::getStream(stream));
|
||||
#endif
|
||||
#endif
|
||||
}
|
||||
@@ -692,7 +692,7 @@ void cv::ogl::Buffer::copyTo(OutputArray arr) const
|
||||
#endif
|
||||
}
|
||||
|
||||
void cv::ogl::Buffer::copyTo(OutputArray arr, gpu::Stream& stream) const
|
||||
void cv::ogl::Buffer::copyTo(OutputArray arr, cuda::Stream& stream) const
|
||||
{
|
||||
#ifndef HAVE_OPENGL
|
||||
(void) arr;
|
||||
@@ -706,7 +706,7 @@ void cv::ogl::Buffer::copyTo(OutputArray arr, gpu::Stream& stream) const
|
||||
#else
|
||||
arr.create(rows_, cols_, type_);
|
||||
GpuMat dmat = arr.getGpuMat();
|
||||
impl_->copyTo(dmat.data, dmat.step, dmat.cols * dmat.elemSize(), dmat.rows, gpu::StreamAccessor::getStream(stream));
|
||||
impl_->copyTo(dmat.data, dmat.step, dmat.cols * dmat.elemSize(), dmat.rows, cuda::StreamAccessor::getStream(stream));
|
||||
#endif
|
||||
#endif
|
||||
}
|
||||
@@ -794,7 +794,7 @@ void cv::ogl::Buffer::unmapDevice()
|
||||
#endif
|
||||
}
|
||||
|
||||
gpu::GpuMat cv::ogl::Buffer::mapDevice(gpu::Stream& stream)
|
||||
cuda::GpuMat cv::ogl::Buffer::mapDevice(cuda::Stream& stream)
|
||||
{
|
||||
#ifndef HAVE_OPENGL
|
||||
(void) stream;
|
||||
@@ -806,12 +806,12 @@ gpu::GpuMat cv::ogl::Buffer::mapDevice(gpu::Stream& stream)
|
||||
throw_no_cuda();
|
||||
return GpuMat();
|
||||
#else
|
||||
return GpuMat(rows_, cols_, type_, impl_->mapDevice(gpu::StreamAccessor::getStream(stream)));
|
||||
return GpuMat(rows_, cols_, type_, impl_->mapDevice(cuda::StreamAccessor::getStream(stream)));
|
||||
#endif
|
||||
#endif
|
||||
}
|
||||
|
||||
void cv::ogl::Buffer::unmapDevice(gpu::Stream& stream)
|
||||
void cv::ogl::Buffer::unmapDevice(cuda::Stream& stream)
|
||||
{
|
||||
#ifndef HAVE_OPENGL
|
||||
(void) stream;
|
||||
@@ -821,7 +821,7 @@ void cv::ogl::Buffer::unmapDevice(gpu::Stream& stream)
|
||||
(void) stream;
|
||||
throw_no_cuda();
|
||||
#else
|
||||
impl_->unmapDevice(gpu::StreamAccessor::getStream(stream));
|
||||
impl_->unmapDevice(cuda::StreamAccessor::getStream(stream));
|
||||
#endif
|
||||
#endif
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user