mirror of
https://github.com/opencv/opencv.git
synced 2026-07-31 08:13:04 +04:00
Utilize CV_UNUSED macro
This commit is contained in:
@@ -267,7 +267,7 @@ class cv::cuda::Stream::Impl
|
||||
public:
|
||||
Impl(void* ptr = 0)
|
||||
{
|
||||
(void) ptr;
|
||||
CV_UNUSED(ptr);
|
||||
throw_no_cuda();
|
||||
}
|
||||
};
|
||||
@@ -439,7 +439,7 @@ cv::cuda::Stream::Stream()
|
||||
cv::cuda::Stream::Stream(const Ptr<GpuMat::Allocator>& allocator)
|
||||
{
|
||||
#ifndef HAVE_CUDA
|
||||
(void) allocator;
|
||||
CV_UNUSED(allocator);
|
||||
throw_no_cuda();
|
||||
#else
|
||||
impl_ = makePtr<Impl>(allocator);
|
||||
@@ -473,7 +473,7 @@ void cv::cuda::Stream::waitForCompletion()
|
||||
void cv::cuda::Stream::waitEvent(const Event& event)
|
||||
{
|
||||
#ifndef HAVE_CUDA
|
||||
(void) event;
|
||||
CV_UNUSED(event);
|
||||
throw_no_cuda();
|
||||
#else
|
||||
cudaSafeCall( cudaStreamWaitEvent(impl_->stream, EventAccessor::getEvent(event), 0) );
|
||||
@@ -505,13 +505,13 @@ namespace
|
||||
void cv::cuda::Stream::enqueueHostCallback(StreamCallback callback, void* userData)
|
||||
{
|
||||
#ifndef HAVE_CUDA
|
||||
(void) callback;
|
||||
(void) userData;
|
||||
CV_UNUSED(callback);
|
||||
CV_UNUSED(userData);
|
||||
throw_no_cuda();
|
||||
#else
|
||||
#if CUDART_VERSION < 5000
|
||||
(void) callback;
|
||||
(void) userData;
|
||||
CV_UNUSED(callback);
|
||||
CV_UNUSED(userData);
|
||||
CV_Error(cv::Error::StsNotImplemented, "This function requires CUDA >= 5.0");
|
||||
#else
|
||||
CallbackData* data = new CallbackData(callback, userData);
|
||||
@@ -658,7 +658,7 @@ namespace
|
||||
void cv::cuda::setBufferPoolUsage(bool on)
|
||||
{
|
||||
#ifndef HAVE_CUDA
|
||||
(void)on;
|
||||
CV_UNUSED(on);
|
||||
throw_no_cuda();
|
||||
#else
|
||||
enableMemoryPool = on;
|
||||
@@ -668,9 +668,9 @@ void cv::cuda::setBufferPoolUsage(bool on)
|
||||
void cv::cuda::setBufferPoolConfig(int deviceId, size_t stackSize, int stackCount)
|
||||
{
|
||||
#ifndef HAVE_CUDA
|
||||
(void)deviceId;
|
||||
(void)stackSize;
|
||||
(void)stackCount;
|
||||
CV_UNUSED(deviceId);
|
||||
CV_UNUSED(stackSize);
|
||||
CV_UNUSED(stackCount);
|
||||
throw_no_cuda();
|
||||
#else
|
||||
const int currentDevice = getDevice();
|
||||
@@ -698,7 +698,7 @@ void cv::cuda::setBufferPoolConfig(int deviceId, size_t stackSize, int stackCoun
|
||||
#ifndef HAVE_CUDA
|
||||
cv::cuda::BufferPool::BufferPool(Stream& stream)
|
||||
{
|
||||
(void) stream;
|
||||
CV_UNUSED(stream);
|
||||
throw_no_cuda();
|
||||
}
|
||||
#else
|
||||
@@ -710,9 +710,9 @@ cv::cuda::BufferPool::BufferPool(Stream& stream) : allocator_(stream.impl_->allo
|
||||
GpuMat cv::cuda::BufferPool::getBuffer(int rows, int cols, int type)
|
||||
{
|
||||
#ifndef HAVE_CUDA
|
||||
(void) rows;
|
||||
(void) cols;
|
||||
(void) type;
|
||||
CV_UNUSED(rows);
|
||||
CV_UNUSED(cols);
|
||||
CV_UNUSED(type);
|
||||
throw_no_cuda();
|
||||
#else
|
||||
GpuMat buf(allocator_);
|
||||
@@ -782,7 +782,7 @@ Event cv::cuda::EventAccessor::wrapEvent(cudaEvent_t event)
|
||||
cv::cuda::Event::Event(CreateFlags flags)
|
||||
{
|
||||
#ifndef HAVE_CUDA
|
||||
(void) flags;
|
||||
CV_UNUSED(flags);
|
||||
throw_no_cuda();
|
||||
#else
|
||||
impl_ = makePtr<Impl>(flags);
|
||||
@@ -792,7 +792,7 @@ cv::cuda::Event::Event(CreateFlags flags)
|
||||
void cv::cuda::Event::record(Stream& stream)
|
||||
{
|
||||
#ifndef HAVE_CUDA
|
||||
(void) stream;
|
||||
CV_UNUSED(stream);
|
||||
throw_no_cuda();
|
||||
#else
|
||||
cudaSafeCall( cudaEventRecord(impl_->event, StreamAccessor::getStream(stream)) );
|
||||
@@ -826,8 +826,8 @@ void cv::cuda::Event::waitForCompletion()
|
||||
float cv::cuda::Event::elapsedTime(const Event& start, const Event& end)
|
||||
{
|
||||
#ifndef HAVE_CUDA
|
||||
(void) start;
|
||||
(void) end;
|
||||
CV_UNUSED(start);
|
||||
CV_UNUSED(end);
|
||||
throw_no_cuda();
|
||||
#else
|
||||
float ms;
|
||||
|
||||
Reference in New Issue
Block a user