minor device namespace refactor

This commit is contained in:
Anatoly Baksheev
2012-12-10 17:36:02 +04:00
parent 5fe9bb717d
commit 50946b59c1
3 changed files with 23 additions and 12 deletions

View File

@@ -85,8 +85,6 @@ static inline void ___cudaSafeCall(cudaError_t err, const char *file, const int
cv::gpu::error(cudaGetErrorString(err), file, line, func);
}
#ifdef __CUDACC__
namespace cv { namespace gpu
{
__host__ __device__ __forceinline__ int divUp(int total, int grain)
@@ -96,6 +94,9 @@ namespace cv { namespace gpu
namespace device
{
using cv::gpu::divUp;
#ifdef __CUDACC__
typedef unsigned char uchar;
typedef unsigned short ushort;
typedef signed char schar;
@@ -106,9 +107,10 @@ namespace cv { namespace gpu
cudaChannelFormatDesc desc = cudaCreateChannelDesc<T>();
cudaSafeCall( cudaBindTexture2D(0, tex, img.ptr(), &desc, img.cols, img.rows, img.step) );
}
#endif // __CUDACC__
}
}}
#endif // __CUDACC__
#endif // __OPENCV_GPU_COMMON_HPP__