mirror of
https://github.com/opencv/opencv.git
synced 2025-08-06 06:26:29 +08:00
build: fix warnings
This commit is contained in:
parent
331af82e6d
commit
f708a11f0f
@ -344,13 +344,12 @@ void cv::cuda::ensureSizeIsEnough(int rows, int cols, int type, OutputArray arr)
|
|||||||
|
|
||||||
GpuMat cv::cuda::getInputMat(InputArray _src, Stream& stream)
|
GpuMat cv::cuda::getInputMat(InputArray _src, Stream& stream)
|
||||||
{
|
{
|
||||||
GpuMat src;
|
|
||||||
|
|
||||||
#ifndef HAVE_CUDA
|
#ifndef HAVE_CUDA
|
||||||
(void) _src;
|
(void) _src;
|
||||||
(void) stream;
|
(void) stream;
|
||||||
throw_no_cuda();
|
throw_no_cuda();
|
||||||
#else
|
#else
|
||||||
|
GpuMat src;
|
||||||
if (_src.kind() == _InputArray::CUDA_GPU_MAT)
|
if (_src.kind() == _InputArray::CUDA_GPU_MAT)
|
||||||
{
|
{
|
||||||
src = _src.getGpuMat();
|
src = _src.getGpuMat();
|
||||||
@ -361,15 +360,12 @@ GpuMat cv::cuda::getInputMat(InputArray _src, Stream& stream)
|
|||||||
src = pool.getBuffer(_src.size(), _src.type());
|
src = pool.getBuffer(_src.size(), _src.type());
|
||||||
src.upload(_src, stream);
|
src.upload(_src, stream);
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
return src;
|
return src;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
GpuMat cv::cuda::getOutputMat(OutputArray _dst, int rows, int cols, int type, Stream& stream)
|
GpuMat cv::cuda::getOutputMat(OutputArray _dst, int rows, int cols, int type, Stream& stream)
|
||||||
{
|
{
|
||||||
GpuMat dst;
|
|
||||||
|
|
||||||
#ifndef HAVE_CUDA
|
#ifndef HAVE_CUDA
|
||||||
(void) _dst;
|
(void) _dst;
|
||||||
(void) rows;
|
(void) rows;
|
||||||
@ -378,6 +374,7 @@ GpuMat cv::cuda::getOutputMat(OutputArray _dst, int rows, int cols, int type, St
|
|||||||
(void) stream;
|
(void) stream;
|
||||||
throw_no_cuda();
|
throw_no_cuda();
|
||||||
#else
|
#else
|
||||||
|
GpuMat dst;
|
||||||
if (_dst.kind() == _InputArray::CUDA_GPU_MAT)
|
if (_dst.kind() == _InputArray::CUDA_GPU_MAT)
|
||||||
{
|
{
|
||||||
_dst.create(rows, cols, type);
|
_dst.create(rows, cols, type);
|
||||||
@ -388,9 +385,8 @@ GpuMat cv::cuda::getOutputMat(OutputArray _dst, int rows, int cols, int type, St
|
|||||||
BufferPool pool(stream);
|
BufferPool pool(stream);
|
||||||
dst = pool.getBuffer(rows, cols, type);
|
dst = pool.getBuffer(rows, cols, type);
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
return dst;
|
return dst;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
void cv::cuda::syncOutput(const GpuMat& dst, OutputArray _dst, Stream& stream)
|
void cv::cuda::syncOutput(const GpuMat& dst, OutputArray _dst, Stream& stream)
|
||||||
|
Loading…
Reference in New Issue
Block a user