mirror of
https://github.com/opencv/opencv.git
synced 2026-07-30 15:53:03 +04:00
softcascade: remove device dependency on gpu
This commit is contained in:
@@ -43,7 +43,7 @@
|
||||
#ifndef __OPENCV_GPU_STREAM_ACCESSOR_HPP__
|
||||
#define __OPENCV_GPU_STREAM_ACCESSOR_HPP__
|
||||
|
||||
#include "opencv2/gpu/gpu.hpp"
|
||||
#include "opencv2/core/gpumat.hpp"
|
||||
#include "cuda_runtime_api.h"
|
||||
|
||||
namespace cv
|
||||
|
||||
@@ -41,11 +41,13 @@
|
||||
//M*/
|
||||
|
||||
#include "precomp.hpp"
|
||||
#include "opencv2/core/gpumat.hpp"
|
||||
|
||||
using namespace cv;
|
||||
using namespace cv::gpu;
|
||||
|
||||
#if !defined (HAVE_CUDA)
|
||||
#define throw_nogpu() CV_Error(CV_GpuNotSupported, "The library is compiled without CUDA support")
|
||||
|
||||
cv::gpu::Stream::Stream() { throw_nogpu(); }
|
||||
cv::gpu::Stream::~Stream() {}
|
||||
@@ -70,7 +72,7 @@ void cv::gpu::Stream::release() { throw_nogpu(); }
|
||||
|
||||
#else /* !defined (HAVE_CUDA) */
|
||||
|
||||
#include "opencv2/gpu/stream_accessor.hpp"
|
||||
#include "opencv2/core/stream_accessor.hpp"
|
||||
|
||||
namespace
|
||||
{
|
||||
|
||||
@@ -181,12 +181,13 @@ bool cv::gpu::CudaMem::empty() const
|
||||
|
||||
#if !defined (HAVE_CUDA)
|
||||
|
||||
void cv::gpu::registerPageLocked(Mat&) { throw_nogpu(); }
|
||||
void cv::gpu::unregisterPageLocked(Mat&) { throw_nogpu(); }
|
||||
void cv::gpu::CudaMem::create(int /*_rows*/, int /*_cols*/, int /*_type*/, int /*type_alloc*/) { throw_nogpu(); }
|
||||
bool cv::gpu::CudaMem::canMapHostMemory() { throw_nogpu(); return false; }
|
||||
void cv::gpu::CudaMem::release() { throw_nogpu(); }
|
||||
GpuMat cv::gpu::CudaMem::createGpuMatHeader () const { throw_nogpu(); return GpuMat(); }
|
||||
void cv::gpu::registerPageLocked(Mat&) { CV_Error(CV_GpuNotSupported, "The library is compiled without CUDA support"); }
|
||||
void cv::gpu::unregisterPageLocked(Mat&) { CV_Error(CV_GpuNotSupported, "The library is compiled without CUDA support"); }
|
||||
void cv::gpu::CudaMem::create(int /*_rows*/, int /*_cols*/, int /*_type*/, int /*type_alloc*/)
|
||||
{ CV_Error(CV_GpuNotSupported, "The library is compiled without CUDA support"); }
|
||||
bool cv::gpu::CudaMem::canMapHostMemory() { CV_Error(CV_GpuNotSupported, "The library is compiled without CUDA support"); return false; }
|
||||
void cv::gpu::CudaMem::release() { CV_Error(CV_GpuNotSupported, "The library is compiled without CUDA support"); }
|
||||
GpuMat cv::gpu::CudaMem::createGpuMatHeader () const { CV_Error(CV_GpuNotSupported, "The library is compiled without CUDA support"); return GpuMat(); }
|
||||
|
||||
#else /* !defined (HAVE_CUDA) */
|
||||
#include <cuda_runtime_api.h>
|
||||
|
||||
Reference in New Issue
Block a user