fixes for the newly added gcc warning keys
This commit is contained in:
@@ -68,7 +68,7 @@ void cv::gpu::polarToCart(const GpuMat&, const GpuMat&, GpuMat&, GpuMat&, bool,
|
||||
void cv::gpu::gemm(const GpuMat& src1, const GpuMat& src2, double alpha, const GpuMat& src3, double beta, GpuMat& dst, int flags, Stream& stream)
|
||||
{
|
||||
#ifndef HAVE_CUBLAS
|
||||
|
||||
(void)src1; (void)src2; (void)alpha; (void)src3; (void)beta; (void)dst; (void)flags; (void)stream;
|
||||
CV_Error(CV_StsNotImplemented, "The library was build without CUBLAS");
|
||||
|
||||
#else
|
||||
|
@@ -748,6 +748,7 @@ namespace cv { namespace gpu { namespace device
|
||||
const DevMem2Db& trainIdx, const DevMem2Db& distance,
|
||||
int cc, cudaStream_t stream)
|
||||
{
|
||||
(void)cc;
|
||||
if (query.cols <= 64)
|
||||
{
|
||||
matchUnrolledCached<16, 64, Dist>(query, train, mask, static_cast< DevMem2D_<int2> >(trainIdx), static_cast< DevMem2D_<float2> > (distance), stream);
|
||||
@@ -779,6 +780,7 @@ namespace cv { namespace gpu { namespace device
|
||||
const DevMem2Db& trainIdx, const DevMem2Db& imgIdx, const DevMem2Db& distance,
|
||||
int cc, cudaStream_t stream)
|
||||
{
|
||||
(void)cc;
|
||||
if (query.cols <= 64)
|
||||
{
|
||||
matchUnrolledCached<16, 64, Dist>(query, trains, n, mask, static_cast< DevMem2D_<int2> >(trainIdx), static_cast< DevMem2D_<int2> >(imgIdx), static_cast< DevMem2D_<float2> > (distance), stream);
|
||||
@@ -943,6 +945,7 @@ namespace cv { namespace gpu { namespace device
|
||||
const DevMem2Df& allDist,
|
||||
int cc, cudaStream_t stream)
|
||||
{
|
||||
(void)cc;
|
||||
if (query.cols <= 64)
|
||||
{
|
||||
calcDistanceUnrolled<16, 64, Dist>(query, train, mask, allDist, stream);
|
||||
|
@@ -567,6 +567,7 @@ namespace cv { namespace gpu { namespace device
|
||||
const DevMem2Di& trainIdx, const DevMem2Df& distance,
|
||||
int cc, cudaStream_t stream)
|
||||
{
|
||||
(void)cc;
|
||||
if (query.cols <= 64)
|
||||
{
|
||||
matchUnrolledCached<16, 64, Dist>(query, train, mask, trainIdx, distance, stream);
|
||||
@@ -598,6 +599,7 @@ namespace cv { namespace gpu { namespace device
|
||||
const DevMem2Di& trainIdx, const DevMem2Di& imgIdx, const DevMem2Df& distance,
|
||||
int cc, cudaStream_t stream)
|
||||
{
|
||||
(void)cc;
|
||||
if (query.cols <= 64)
|
||||
{
|
||||
matchUnrolledCached<16, 64, Dist>(query, trains, n, mask, trainIdx, imgIdx, distance, stream);
|
||||
|
@@ -281,6 +281,7 @@ namespace cv { namespace gpu { namespace device
|
||||
const DevMem2Di& trainIdx, const DevMem2Df& distance, const DevMem2D_<unsigned int>& nMatches,
|
||||
int cc, cudaStream_t stream)
|
||||
{
|
||||
(void)cc;
|
||||
if (query.cols <= 64)
|
||||
{
|
||||
matchUnrolled<16, 64, Dist>(query, train, maxDistance, mask, trainIdx, distance, nMatches, stream);
|
||||
@@ -312,6 +313,7 @@ namespace cv { namespace gpu { namespace device
|
||||
const DevMem2Di& trainIdx, const DevMem2Di& imgIdx, const DevMem2Df& distance, const DevMem2D_<unsigned int>& nMatches,
|
||||
int cc, cudaStream_t stream)
|
||||
{
|
||||
(void)cc;
|
||||
if (query.cols <= 64)
|
||||
{
|
||||
matchUnrolled<16, 64, Dist>(query, trains, n, maxDistance, masks, trainIdx, imgIdx, distance, nMatches, stream);
|
||||
|
@@ -619,6 +619,7 @@ namespace cv { namespace gpu { namespace device
|
||||
void compute_gradients_8UC4(int nbins, int height, int width, const DevMem2Db& img,
|
||||
float angle_scale, DevMem2Df grad, DevMem2Db qangle, bool correct_gamma)
|
||||
{
|
||||
(void)nbins;
|
||||
const int nthreads = 256;
|
||||
|
||||
dim3 bdim(nthreads, 1);
|
||||
@@ -691,6 +692,7 @@ namespace cv { namespace gpu { namespace device
|
||||
void compute_gradients_8UC1(int nbins, int height, int width, const DevMem2Db& img,
|
||||
float angle_scale, DevMem2Df grad, DevMem2Db qangle, bool correct_gamma)
|
||||
{
|
||||
(void)nbins;
|
||||
const int nthreads = 256;
|
||||
|
||||
dim3 bdim(nthreads, 1);
|
||||
|
@@ -87,6 +87,9 @@ namespace cv { namespace gpu { namespace device
|
||||
{
|
||||
static void call(DevMem2D_<T> src, DevMem2D_<T> srcWhole, int xoff, int yoff, DevMem2Df mapx, DevMem2Df mapy, DevMem2D_<T> dst, const float* borderValue, int)
|
||||
{
|
||||
(void)srcWhole;
|
||||
(void)xoff;
|
||||
(void)yoff;
|
||||
typedef typename TypeVec<float, VecTraits<T>::cn>::vec_type work_type;
|
||||
|
||||
dim3 block(32, 8);
|
||||
|
@@ -131,6 +131,10 @@ namespace cv { namespace gpu { namespace device
|
||||
{
|
||||
static void call(DevMem2D_<T> src, DevMem2D_<T> srcWhole, int xoff, int yoff, float fx, float fy, DevMem2D_<T> dst)
|
||||
{
|
||||
(void)srcWhole;
|
||||
(void)xoff;
|
||||
(void)yoff;
|
||||
|
||||
dim3 block(32, 8);
|
||||
dim3 grid(divUp(dst.cols, block.x), divUp(dst.rows, block.y));
|
||||
|
||||
@@ -219,6 +223,9 @@ namespace cv { namespace gpu { namespace device
|
||||
{
|
||||
static void call(DevMem2D_<T> src, DevMem2D_<T> srcWhole, int xoff, int yoff, float fx, float fy, DevMem2D_<T> dst, cudaStream_t stream)
|
||||
{
|
||||
(void)srcWhole;
|
||||
(void)xoff;
|
||||
(void)yoff;
|
||||
int iscale_x = round(fx);
|
||||
int iscale_y = round(fy);
|
||||
|
||||
|
@@ -158,6 +158,10 @@ namespace cv { namespace gpu { namespace device
|
||||
{
|
||||
static void call(DevMem2D_<T> src, DevMem2D_<T> srcWhole, int xoff, int yoff, DevMem2D_<T> dst, const float* borderValue, int)
|
||||
{
|
||||
(void)xoff;
|
||||
(void)yoff;
|
||||
(void)srcWhole;
|
||||
|
||||
typedef typename TypeVec<float, VecTraits<T>::cn>::vec_type work_type;
|
||||
|
||||
dim3 block(32, 8);
|
||||
|
@@ -1136,7 +1136,7 @@ NCVStatus NCVBroxOpticalFlow(const NCVBroxOpticalFlowDescriptor desc,
|
||||
ptrVNew->ptr(), dstSize, ns * sizeof (float), dstROI, 1.0f/scale_factor, 1.0f/scale_factor, nppStBicubic) );
|
||||
|
||||
ScaleVector(ptrVNew->ptr(), ptrVNew->ptr(), 1.0f/scale_factor, ns * nh, stream);
|
||||
ncvAssertCUDALastErrorReturn(NCV_CUDA_ERROR);
|
||||
ncvAssertCUDALastErrorReturn((int)NCV_CUDA_ERROR);
|
||||
|
||||
cv::gpu::device::swap<FloatVector*>(ptrU, ptrUNew);
|
||||
cv::gpu::device::swap<FloatVector*>(ptrV, ptrVNew);
|
||||
@@ -1145,17 +1145,17 @@ NCVStatus NCVBroxOpticalFlow(const NCVBroxOpticalFlowDescriptor desc,
|
||||
}
|
||||
|
||||
// end of warping iterations
|
||||
ncvAssertCUDAReturn(cudaStreamSynchronize(stream), NCV_CUDA_ERROR);
|
||||
ncvAssertCUDAReturn(cudaStreamSynchronize(stream), (int)NCV_CUDA_ERROR);
|
||||
|
||||
ncvAssertCUDAReturn( cudaMemcpy2DAsync
|
||||
(uOut.ptr(), uOut.pitch(), ptrU->ptr(),
|
||||
kSourcePitch, kSourceWidth*sizeof(float), kSourceHeight, cudaMemcpyDeviceToDevice, stream), NCV_CUDA_ERROR );
|
||||
kSourcePitch, kSourceWidth*sizeof(float), kSourceHeight, cudaMemcpyDeviceToDevice, stream), (int)NCV_CUDA_ERROR );
|
||||
|
||||
ncvAssertCUDAReturn( cudaMemcpy2DAsync
|
||||
(vOut.ptr(), vOut.pitch(), ptrV->ptr(),
|
||||
kSourcePitch, kSourceWidth*sizeof(float), kSourceHeight, cudaMemcpyDeviceToDevice, stream), NCV_CUDA_ERROR );
|
||||
kSourcePitch, kSourceWidth*sizeof(float), kSourceHeight, cudaMemcpyDeviceToDevice, stream), (int)NCV_CUDA_ERROR );
|
||||
|
||||
ncvAssertCUDAReturn(cudaStreamSynchronize(stream), NCV_CUDA_ERROR);
|
||||
ncvAssertCUDAReturn(cudaStreamSynchronize(stream), (int)NCV_CUDA_ERROR);
|
||||
}
|
||||
|
||||
return NCV_SUCCESS;
|
||||
|
@@ -687,6 +687,7 @@ struct applyHaarClassifierAnchorParallelFunctor
|
||||
template<class TList>
|
||||
void call(TList tl)
|
||||
{
|
||||
(void)tl;
|
||||
applyHaarClassifierAnchorParallel <
|
||||
Loki::TL::TypeAt<TList, 0>::Result::value,
|
||||
Loki::TL::TypeAt<TList, 1>::Result::value,
|
||||
@@ -796,6 +797,7 @@ struct applyHaarClassifierClassifierParallelFunctor
|
||||
template<class TList>
|
||||
void call(TList tl)
|
||||
{
|
||||
(void)tl;
|
||||
applyHaarClassifierClassifierParallel <
|
||||
Loki::TL::TypeAt<TList, 0>::Result::value,
|
||||
Loki::TL::TypeAt<TList, 1>::Result::value,
|
||||
@@ -876,6 +878,7 @@ struct initializeMaskVectorFunctor
|
||||
template<class TList>
|
||||
void call(TList tl)
|
||||
{
|
||||
(void)tl;
|
||||
initializeMaskVector <
|
||||
Loki::TL::TypeAt<TList, 0>::Result::value,
|
||||
Loki::TL::TypeAt<TList, 1>::Result::value >
|
||||
|
@@ -854,6 +854,7 @@ static NCVStatus drawRectsWrapperDevice(T *d_dst,
|
||||
T color,
|
||||
cudaStream_t cuStream)
|
||||
{
|
||||
(void)cuStream;
|
||||
ncvAssertReturn(d_dst != NULL && d_rects != NULL, NCV_NULL_PTR);
|
||||
ncvAssertReturn(dstWidth > 0 && dstHeight > 0, NCV_DIMENSIONS_INVALID);
|
||||
ncvAssertReturn(dstStride >= dstWidth, NCV_INVALID_STEP);
|
||||
|
@@ -1,7 +1,7 @@
|
||||
/*M///////////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING.
|
||||
//
|
||||
// IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING.
|
||||
//
|
||||
// By downloading, copying, installing or using the software you agree to this license.
|
||||
// If you do not agree to this license, do not download, install,
|
||||
// copy or use the software.
|
||||
@@ -461,7 +461,7 @@ public:
|
||||
|
||||
virtual NcvBool isInitialized(void) const = 0;
|
||||
virtual NcvBool isCounting(void) const = 0;
|
||||
|
||||
|
||||
virtual NCVMemoryType memType(void) const = 0;
|
||||
virtual Ncv32u alignment(void) const = 0;
|
||||
virtual size_t maxSize(void) const = 0;
|
||||
@@ -585,11 +585,11 @@ public:
|
||||
}
|
||||
else
|
||||
{
|
||||
ncvAssertReturn(dst._length * sizeof(T) >= howMuch &&
|
||||
ncvAssertReturn(dst._length * sizeof(T) >= howMuch &&
|
||||
this->_length * sizeof(T) >= howMuch &&
|
||||
howMuch > 0, NCV_MEM_COPY_ERROR);
|
||||
}
|
||||
ncvAssertReturn((this->_ptr != NULL || this->_memtype == NCVMemoryTypeNone) &&
|
||||
ncvAssertReturn((this->_ptr != NULL || this->_memtype == NCVMemoryTypeNone) &&
|
||||
(dst._ptr != NULL || dst._memtype == NCVMemoryTypeNone), NCV_NULL_PTR);
|
||||
|
||||
NCVStatus ncvStat = NCV_SUCCESS;
|
||||
@@ -766,18 +766,18 @@ public:
|
||||
}
|
||||
else
|
||||
{
|
||||
ncvAssertReturn(dst._pitch * dst._height >= howMuch &&
|
||||
ncvAssertReturn(dst._pitch * dst._height >= howMuch &&
|
||||
this->_pitch * this->_height >= howMuch &&
|
||||
howMuch > 0, NCV_MEM_COPY_ERROR);
|
||||
}
|
||||
ncvAssertReturn((this->_ptr != NULL || this->_memtype == NCVMemoryTypeNone) &&
|
||||
ncvAssertReturn((this->_ptr != NULL || this->_memtype == NCVMemoryTypeNone) &&
|
||||
(dst._ptr != NULL || dst._memtype == NCVMemoryTypeNone), NCV_NULL_PTR);
|
||||
|
||||
NCVStatus ncvStat = NCV_SUCCESS;
|
||||
if (this->_memtype != NCVMemoryTypeNone)
|
||||
{
|
||||
ncvStat = memSegCopyHelper(dst._ptr, dst._memtype,
|
||||
this->_ptr, this->_memtype,
|
||||
ncvStat = memSegCopyHelper(dst._ptr, dst._memtype,
|
||||
this->_ptr, this->_memtype,
|
||||
howMuch, cuStream);
|
||||
}
|
||||
|
||||
@@ -788,7 +788,7 @@ public:
|
||||
{
|
||||
ncvAssertReturn(this->width() >= roi.width && this->height() >= roi.height &&
|
||||
dst.width() >= roi.width && dst.height() >= roi.height, NCV_MEM_COPY_ERROR);
|
||||
ncvAssertReturn((this->_ptr != NULL || this->_memtype == NCVMemoryTypeNone) &&
|
||||
ncvAssertReturn((this->_ptr != NULL || this->_memtype == NCVMemoryTypeNone) &&
|
||||
(dst._ptr != NULL || dst._memtype == NCVMemoryTypeNone), NCV_NULL_PTR);
|
||||
|
||||
NCVStatus ncvStat = NCV_SUCCESS;
|
||||
@@ -802,7 +802,7 @@ public:
|
||||
return ncvStat;
|
||||
}
|
||||
|
||||
T &at(Ncv32u x, Ncv32u y) const
|
||||
T& at(Ncv32u x, Ncv32u y) const
|
||||
{
|
||||
NcvBool bOutRange = (x >= this->_width || y >= this->_height);
|
||||
ncvAssertPrintCheck(!bOutRange, "Error addressing matrix at [" << x << ", " << y << "]");
|
||||
|
@@ -211,6 +211,7 @@ namespace NCVRuntimeTemplateBool
|
||||
|
||||
static void call(Func &functor, std::vector<int> &templateParams)
|
||||
{
|
||||
(void)templateParams;
|
||||
functor.call(TList());
|
||||
}
|
||||
};
|
||||
|
@@ -55,7 +55,12 @@ namespace cv { namespace gpu { namespace device
|
||||
typedef typename Ptr2D::elem_type elem_type;
|
||||
typedef float index_type;
|
||||
|
||||
explicit __host__ __device__ __forceinline__ PointFilter(const Ptr2D& src_, float fx = 0.f, float fy = 0.f) : src(src_) {}
|
||||
explicit __host__ __device__ __forceinline__ PointFilter(const Ptr2D& src_, float fx = 0.f, float fy = 0.f)
|
||||
: src(src_)
|
||||
{
|
||||
(void)fx;
|
||||
(void)fy;
|
||||
}
|
||||
|
||||
__device__ __forceinline__ elem_type operator ()(float y, float x) const
|
||||
{
|
||||
@@ -70,8 +75,12 @@ namespace cv { namespace gpu { namespace device
|
||||
typedef typename Ptr2D::elem_type elem_type;
|
||||
typedef float index_type;
|
||||
|
||||
explicit __host__ __device__ __forceinline__ LinearFilter(const Ptr2D& src_, float fx = 0.f, float fy = 0.f) : src(src_) {}
|
||||
|
||||
explicit __host__ __device__ __forceinline__ LinearFilter(const Ptr2D& src_, float fx = 0.f, float fy = 0.f)
|
||||
: src(src_)
|
||||
{
|
||||
(void)fx;
|
||||
(void)fy;
|
||||
}
|
||||
__device__ __forceinline__ elem_type operator ()(float y, float x) const
|
||||
{
|
||||
typedef typename TypeVec<float, VecTraits<elem_type>::cn>::vec_type work_type;
|
||||
@@ -107,7 +116,12 @@ namespace cv { namespace gpu { namespace device
|
||||
typedef float index_type;
|
||||
typedef typename TypeVec<float, VecTraits<elem_type>::cn>::vec_type work_type;
|
||||
|
||||
explicit __host__ __device__ __forceinline__ CubicFilter(const Ptr2D& src_, float fx = 0.f, float fy = 0.f) : src(src_) {}
|
||||
explicit __host__ __device__ __forceinline__ CubicFilter(const Ptr2D& src_, float fx = 0.f, float fy = 0.f)
|
||||
: src(src_)
|
||||
{
|
||||
(void)fx;
|
||||
(void)fy;
|
||||
}
|
||||
|
||||
static __device__ __forceinline__ float bicubicCoeff(float x_)
|
||||
{
|
||||
|
@@ -470,7 +470,7 @@ namespace cv { namespace gpu { namespace device
|
||||
|
||||
template <typename T> struct thresh_trunc_func : unary_function<T, T>
|
||||
{
|
||||
explicit __host__ __device__ __forceinline__ thresh_trunc_func(T thresh_, T maxVal_ = 0) : thresh(thresh_) {}
|
||||
explicit __host__ __device__ __forceinline__ thresh_trunc_func(T thresh_, T maxVal_ = 0) : thresh(thresh_) {(void)maxVal_;}
|
||||
|
||||
__device__ __forceinline__ T operator()(typename TypeTraits<T>::ParameterType src) const
|
||||
{
|
||||
@@ -487,7 +487,7 @@ namespace cv { namespace gpu { namespace device
|
||||
|
||||
template <typename T> struct thresh_to_zero_func : unary_function<T, T>
|
||||
{
|
||||
explicit __host__ __device__ __forceinline__ thresh_to_zero_func(T thresh_, T maxVal_ = 0) : thresh(thresh_) {}
|
||||
explicit __host__ __device__ __forceinline__ thresh_to_zero_func(T thresh_, T maxVal_ = 0) : thresh(thresh_) {(void)maxVal_;}
|
||||
|
||||
__device__ __forceinline__ T operator()(typename TypeTraits<T>::ParameterType src) const
|
||||
{
|
||||
@@ -503,7 +503,7 @@ namespace cv { namespace gpu { namespace device
|
||||
|
||||
template <typename T> struct thresh_to_zero_inv_func : unary_function<T, T>
|
||||
{
|
||||
explicit __host__ __device__ __forceinline__ thresh_to_zero_inv_func(T thresh_, T maxVal_ = 0) : thresh(thresh_) {}
|
||||
explicit __host__ __device__ __forceinline__ thresh_to_zero_inv_func(T thresh_, T maxVal_ = 0) : thresh(thresh_) {(void)maxVal_;}
|
||||
|
||||
__device__ __forceinline__ T operator()(typename TypeTraits<T>::ParameterType src) const
|
||||
{
|
||||
|
Reference in New Issue
Block a user