Skip to content

Commit

Permalink
Merge pull request opencv#3527 from jet47:cuda-deprivate-old-device-l…
Browse files Browse the repository at this point in the history
…ayer
  • Loading branch information
vpisarev committed Dec 24, 2014
2 parents 214f633 + 1d82aec commit cddee22
Show file tree
Hide file tree
Showing 29 changed files with 231 additions and 162 deletions.
19 changes: 15 additions & 4 deletions modules/core/include/opencv2/core/cuda.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,20 @@
#include "opencv2/core.hpp"
#include "opencv2/core/cuda_types.hpp"

/**
@defgroup cuda CUDA-accelerated Computer Vision
@{
@defgroup cudacore Core part
@{
@defgroup cudacore_init Initalization and Information
@defgroup cudacore_struct Data Structures
@}
@}
*/

namespace cv { namespace cuda {

//! @addtogroup cuda_struct
//! @addtogroup cudacore_struct
//! @{

//////////////////////////////// GpuMat ///////////////////////////////
Expand Down Expand Up @@ -514,11 +525,11 @@ class CV_EXPORTS Event
friend struct EventAccessor;
};

//! @} cuda_struct
//! @} cudacore_struct

//////////////////////////////// Initialization & Info ////////////////////////

//! @addtogroup cuda_init
//! @addtogroup cudacore_init
//! @{

/** @brief Returns the number of installed CUDA-enabled devices.
Expand Down Expand Up @@ -813,7 +824,7 @@ class CV_EXPORTS DeviceInfo
CV_EXPORTS void printCudaDeviceInfo(int device);
CV_EXPORTS void printShortCudaDeviceInfo(int device);

//! @} cuda_init
//! @} cudacore_init

}} // namespace cv { namespace cuda {

Expand Down
10 changes: 7 additions & 3 deletions modules/core/include/opencv2/core/cuda/block.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,14 @@
#ifndef __OPENCV_CUDA_DEVICE_BLOCK_HPP__
#define __OPENCV_CUDA_DEVICE_BLOCK_HPP__

/** @file
* @deprecated Use @ref cudev instead.
*/

//! @cond IGNORED

namespace cv { namespace cuda { namespace device
{
//! @addtogroup cuda
//! @{
struct Block
{
static __device__ __forceinline__ unsigned int id()
Expand Down Expand Up @@ -201,7 +204,8 @@ namespace cv { namespace cuda { namespace device
}
}
};
//!@}
}}}

//! @endcond

#endif /* __OPENCV_CUDA_DEVICE_BLOCK_HPP__ */
12 changes: 8 additions & 4 deletions modules/core/include/opencv2/core/cuda/border_interpolate.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -47,11 +47,14 @@
#include "vec_traits.hpp"
#include "vec_math.hpp"

/** @file
* @deprecated Use @ref cudev instead.
*/

//! @cond IGNORED

namespace cv { namespace cuda { namespace device
{
//! @addtogroup cuda
//! @{

//////////////////////////////////////////////////////////////
// BrdConstant

Expand Down Expand Up @@ -712,7 +715,8 @@ namespace cv { namespace cuda { namespace device
int width;
D val;
};
//! @}
}}} // namespace cv { namespace cuda { namespace cudev

//! @endcond

#endif // __OPENCV_CUDA_BORDER_INTERPOLATE_HPP__
11 changes: 8 additions & 3 deletions modules/core/include/opencv2/core/cuda/color.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,14 @@

#include "detail/color_detail.hpp"

/** @file
* @deprecated Use @ref cudev instead.
*/

//! @cond IGNORED

namespace cv { namespace cuda { namespace device
{
//! @addtogroup cuda
//! @{
// All OPENCV_CUDA_IMPLEMENT_*_TRAITS(ColorSpace1_to_ColorSpace2, ...) macros implements
// template <typename T> class ColorSpace1_to_ColorSpace2_traits
// {
Expand Down Expand Up @@ -298,7 +302,8 @@ namespace cv { namespace cuda { namespace device
OPENCV_CUDA_IMPLEMENT_Luv2RGB_TRAITS(luv4_to_lbgra, 4, 4, false, 0)

#undef OPENCV_CUDA_IMPLEMENT_Luv2RGB_TRAITS
//! @}
}}} // namespace cv { namespace cuda { namespace cudev

//! @endcond

#endif // __OPENCV_CUDA_BORDER_INTERPOLATE_HPP__
16 changes: 7 additions & 9 deletions modules/core/include/opencv2/core/cuda/common.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,11 @@
#include "opencv2/core/cvdef.h"
#include "opencv2/core/base.hpp"

/** @file
* @deprecated Use @ref cudev instead.
*/

//! @cond IGNORED

#ifndef CV_PI_F
#ifndef CV_PI
Expand All @@ -58,14 +63,11 @@
#endif

namespace cv { namespace cuda {
//! @addtogroup cuda
//! @{
static inline void checkCudaError(cudaError_t err, const char* file, const int line, const char* func)
{
if (cudaSuccess != err)
cv::error(cv::Error::GpuApiCallError, cudaGetErrorString(err), func, file, line);
}
//! @}
}}

#ifndef cudaSafeCall
Expand All @@ -74,8 +76,6 @@ namespace cv { namespace cuda {

namespace cv { namespace cuda
{
//! @addtogroup cuda
//! @{
template <typename T> static inline bool isAligned(const T* ptr, size_t size)
{
return reinterpret_cast<size_t>(ptr) % size == 0;
Expand All @@ -85,15 +85,12 @@ namespace cv { namespace cuda
{
return step % size == 0;
}
//! @}
}}

namespace cv { namespace cuda
{
namespace device
{
//! @addtogroup cuda
//! @{
__host__ __device__ __forceinline__ int divUp(int total, int grain)
{
return (total + grain - 1) / grain;
Expand All @@ -104,8 +101,9 @@ namespace cv { namespace cuda
cudaChannelFormatDesc desc = cudaCreateChannelDesc<T>();
cudaSafeCall( cudaBindTexture2D(0, tex, img.ptr(), &desc, img.cols, img.rows, img.step) );
}
//! @}
}
}}

//! @endcond

#endif // __OPENCV_CUDA_COMMON_HPP__
12 changes: 8 additions & 4 deletions modules/core/include/opencv2/core/cuda/datamov_utils.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -45,11 +45,14 @@

#include "common.hpp"

/** @file
* @deprecated Use @ref cudev instead.
*/

//! @cond IGNORED

namespace cv { namespace cuda { namespace device
{
//! @addtogroup cuda
//! @{

#if defined __CUDA_ARCH__ && __CUDA_ARCH__ >= 200

// for Fermi memory space is detected automatically
Expand Down Expand Up @@ -103,7 +106,8 @@ namespace cv { namespace cuda { namespace device
#undef OPENCV_CUDA_ASM_PTR

#endif // __CUDA_ARCH__ >= 200
//! @}
}}} // namespace cv { namespace cuda { namespace cudev

//! @endcond

#endif // __OPENCV_CUDA_DATAMOV_UTILS_HPP__
11 changes: 8 additions & 3 deletions modules/core/include/opencv2/core/cuda/dynamic_smem.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,14 @@
#ifndef __OPENCV_CUDA_DYNAMIC_SMEM_HPP__
#define __OPENCV_CUDA_DYNAMIC_SMEM_HPP__

/** @file
* @deprecated Use @ref cudev instead.
*/

//! @cond IGNORED

namespace cv { namespace cuda { namespace device
{
//! @addtogroup cuda
//! @{
template<class T> struct DynamicSharedMem
{
__device__ __forceinline__ operator T*()
Expand Down Expand Up @@ -77,7 +81,8 @@ namespace cv { namespace cuda { namespace device
return (double*)__smem_d;
}
};
//! @}
}}}

//! @endcond

#endif // __OPENCV_CUDA_DYNAMIC_SMEM_HPP__
11 changes: 8 additions & 3 deletions modules/core/include/opencv2/core/cuda/emulation.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,14 @@
#include "common.hpp"
#include "warp_reduce.hpp"

/** @file
* @deprecated Use @ref cudev instead.
*/

//! @cond IGNORED

namespace cv { namespace cuda { namespace device
{
//! @addtogroup cuda
//! @{
struct Emulation
{

Expand Down Expand Up @@ -258,7 +262,8 @@ namespace cv { namespace cuda { namespace device
}
};
}; //struct Emulation
//!@}
}}} // namespace cv { namespace cuda { namespace cudev

//! @endcond

#endif /* OPENCV_CUDA_EMULATION_HPP_ */
11 changes: 8 additions & 3 deletions modules/core/include/opencv2/core/cuda/filters.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,14 @@
#include "vec_math.hpp"
#include "type_traits.hpp"

/** @file
* @deprecated Use @ref cudev instead.
*/

//! @cond IGNORED

namespace cv { namespace cuda { namespace device
{
//! @addtogroup cuda
//! @{
template <typename Ptr2D> struct PointFilter
{
typedef typename Ptr2D::elem_type elem_type;
Expand Down Expand Up @@ -275,7 +279,8 @@ namespace cv { namespace cuda { namespace device
float scale_x, scale_y;
int width, haight;
};
//! @}
}}} // namespace cv { namespace cuda { namespace cudev

//! @endcond

#endif // __OPENCV_CUDA_FILTERS_HPP__
11 changes: 8 additions & 3 deletions modules/core/include/opencv2/core/cuda/funcattrib.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,14 @@

#include <cstdio>

/** @file
* @deprecated Use @ref cudev instead.
*/

//! @cond IGNORED

namespace cv { namespace cuda { namespace device
{
//! @addtogroup cuda
//! @{
template<class Func>
void printFuncAttrib(Func& func)
{
Expand All @@ -68,7 +72,8 @@ namespace cv { namespace cuda { namespace device
printf("\n");
fflush(stdout);
}
//! @}
}}} // namespace cv { namespace cuda { namespace cudev

//! @endcond

#endif /* __OPENCV_CUDA_DEVICE_FUNCATTRIB_HPP_ */
11 changes: 8 additions & 3 deletions modules/core/include/opencv2/core/cuda/functional.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,14 @@
#include "type_traits.hpp"
#include "device_functions.h"

/** @file
* @deprecated Use @ref cudev instead.
*/

//! @cond IGNORED

namespace cv { namespace cuda { namespace device
{
//! @addtogroup cuda
//! @{
// Function Objects
template<typename Argument, typename Result> struct unary_function : public std::unary_function<Argument, Result> {};
template<typename Argument1, typename Argument2, typename Result> struct binary_function : public std::binary_function<Argument1, Argument2, Result> {};
Expand Down Expand Up @@ -786,7 +790,8 @@ namespace cv { namespace cuda { namespace device

#define OPENCV_CUDA_TRANSFORM_FUNCTOR_TRAITS(type) \
template <> struct TransformFunctorTraits< type > : DefaultTransformFunctorTraits< type >
//! @}
}}} // namespace cv { namespace cuda { namespace cudev

//! @endcond

#endif // __OPENCV_CUDA_FUNCTIONAL_HPP__
11 changes: 8 additions & 3 deletions modules/core/include/opencv2/core/cuda/limits.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,14 @@
#include <float.h>
#include "common.hpp"

/** @file
* @deprecated Use @ref cudev instead.
*/

//! @cond IGNORED

namespace cv { namespace cuda { namespace device
{
//! @addtogroup cuda
//! @{
template <class T> struct numeric_limits;

template <> struct numeric_limits<bool>
Expand Down Expand Up @@ -117,7 +121,8 @@ template <> struct numeric_limits<double>
__device__ __forceinline__ static double epsilon() { return DBL_EPSILON; }
static const bool is_signed = true;
};
//! @}
}}} // namespace cv { namespace cuda { namespace cudev {

//! @endcond

#endif // __OPENCV_CUDA_LIMITS_HPP__
Loading

0 comments on commit cddee22

Please sign in to comment.