renamed gpu headers (made it more consistent)

This commit is contained in:
Vladislav Vinogradov
2013-05-30 11:23:18 +04:00
parent 6c253a41c2
commit 4c9773d55f
38 changed files with 61 additions and 54 deletions

View File

@@ -44,7 +44,7 @@
#define __OPENCV_GPU_COMMON_HPP__
#include <cuda_runtime.h>
#include "opencv2/core/cuda_devptrs.hpp"
#include "opencv2/core/gpu_types.hpp"
#include "opencv2/core/cvdef.h"
#include "opencv2/core/base.hpp"

View File

@@ -42,11 +42,15 @@
//M*/
#ifndef __OPENCV_GPUMAT_HPP__
#define __OPENCV_GPUMAT_HPP__
#ifndef __OPENCV_CORE_GPU_HPP__
#define __OPENCV_CORE_GPU_HPP__
#ifndef __cplusplus
# error gpu.hpp header must be compiled as C++
#endif
#include "opencv2/core.hpp"
#include "opencv2/core/cuda_devptrs.hpp"
#include "opencv2/core/gpu_types.hpp"
namespace cv { namespace gpu
{
@@ -719,4 +723,4 @@ void ensureSizeIsEnough(Size size, int type, GpuMat& m)
}} // cv::gpu
#endif // __OPENCV_GPUMAT_HPP__
#endif /* __OPENCV_CORE_GPU_HPP__ */

View File

@@ -53,11 +53,13 @@
#include "opencv2/core/cvdef.h"
#include "opencv2/core/base.hpp"
#include "opencv2/core/gpu.hpp"
#ifdef HAVE_CUDA
# include <cuda.h>
# include <cuda_runtime.h>
# include <npp.h>
# include "opencv2/core/stream_accessor.hpp"
# include "opencv2/core/gpu_stream_accessor.hpp"
# include "opencv2/core/cuda/common.hpp"
# define NPP_VERSION (NPP_VERSION_MAJOR * 1000 + NPP_VERSION_MINOR * 100 + NPP_VERSION_BUILD)

View File

@@ -40,17 +40,21 @@
//
//M*/
#ifndef __OPENCV_CUDA_STREAM_ACCESSOR_HPP__
#define __OPENCV_CUDA_STREAM_ACCESSOR_HPP__
#ifndef __OPENCV_CORE_GPU_STREAM_ACCESSOR_HPP__
#define __OPENCV_CORE_GPU_STREAM_ACCESSOR_HPP__
#include <cuda_runtime.h>
#include "opencv2/core/cvdef.h"
#ifndef __cplusplus
# error gpu_stream_accessor.hpp header must be compiled as C++
#endif
// This is only header file that depends on Cuda. All other headers are independent.
// So if you use OpenCV binaries you do noot need to install Cuda Toolkit.
// But of you wanna use GPU by yourself, may get cuda stream instance using the class below.
// In this case you have to install Cuda Toolkit.
#include <cuda_runtime.h>
#include "opencv2/core/cvdef.h"
namespace cv
{
namespace gpu
@@ -64,4 +68,4 @@ namespace cv
}
}
#endif /* __OPENCV_CUDA_STREAM_ACCESSOR_HPP__ */
#endif /* __OPENCV_CORE_GPU_STREAM_ACCESSOR_HPP__ */

View File

@@ -40,10 +40,12 @@
//
//M*/
#ifndef __OPENCV_CORE_DEVPTRS_HPP__
#define __OPENCV_CORE_DEVPTRS_HPP__
#ifndef __OPENCV_CORE_GPU_TYPES_HPP__
#define __OPENCV_CORE_GPU_TYPES_HPP__
#ifdef __cplusplus
#ifndef __cplusplus
# error gpu_types.hpp header must be compiled as C++
#endif
#ifdef __CUDACC__
#define __CV_GPU_HOST_DEVICE__ __host__ __device__ __forceinline__
@@ -88,7 +90,7 @@ namespace cv
__CV_GPU_HOST_DEVICE__ PtrStep() : step(0) {}
__CV_GPU_HOST_DEVICE__ PtrStep(T* data_, size_t step_) : DevPtr<T>(data_), step(step_) {}
/** \brief stride between two consecutive rows in bytes. Step is stored always and everywhere in bytes!!! */
//! stride between two consecutive rows in bytes. Step is stored always and everywhere in bytes!!!
size_t step;
__CV_GPU_HOST_DEVICE__ T* ptr(int y = 0) { return ( T*)( ( char*)DevPtr<T>::data + y * step); }
@@ -148,6 +150,4 @@ namespace cv
}
}
#endif // __cplusplus
#endif /* __OPENCV_CORE_DEVPTRS_HPP__ */
#endif /* __OPENCV_CORE_GPU_TYPES_HPP__ */