minor + warnings

pull/13383/head
Anatoly Baksheev 14 years ago
parent f10bff2653
commit 6b34532901
  1. 2
      doc/gpu_initialization.tex
  2. 13
      modules/contrib/src/chamfermatching.cpp
  3. 2
      modules/gpu/include/opencv2/gpu/gpu.hpp
  4. 2
      modules/gpu/src/brute_force_matcher.cpp
  5. 16
      modules/gpu/src/matrix_reductions.cpp
  6. 4
      modules/gpu/src/nvidia/core/NCVRuntimeTemplates.hpp
  7. 2
      modules/gpu/src/surf.cpp

@ -31,7 +31,7 @@ enum FeatureSet
FEATURE_SET_COMPUTE_10, FEATURE_SET_COMPUTE_11,
FEATURE_SET_COMPUTE_12, FEATURE_SET_COMPUTE_13,
FEATURE_SET_COMPUTE_20, FEATURE_SET_COMPUTE_21,
ATOMICS, NATIVE_DOUBLE
GLOBAL_ATOMICS, NATIVE_DOUBLE
};
\end{lstlisting}

@ -111,6 +111,9 @@ private:
int scales_;
float min_scale_;
float max_scale_;
LocationImageRange(const LocationImageRange&);
LocationImageRange& operator=(const LocationImageRange&);
public:
LocationImageRange(const vector<Point>& locations, int scales = 5, float min_scale = 0.6, float max_scale = 1.6) :
@ -130,6 +133,8 @@ private:
const vector<Point>& locations_;
const vector<float>& scales_;
LocationScaleImageRange(const LocationScaleImageRange&);
LocationScaleImageRange& operator=(const LocationScaleImageRange&);
public:
LocationScaleImageRange(const vector<Point>& locations, const vector<float>& scales) :
locations_(locations), scales_(scales)
@ -355,6 +360,9 @@ private:
int scale_cnt_;
bool has_next_;
LocationImageIterator(const LocationImageIterator&);
LocationImageIterator& operator=(const LocationImageIterator&);
public:
LocationImageIterator(const vector<Point>& locations, int scales, float min_scale, float max_scale);
@ -374,6 +382,9 @@ private:
size_t iter_;
bool has_next_;
LocationScaleImageIterator(const LocationScaleImageIterator&);
LocationScaleImageIterator& operator=(const LocationScaleImageIterator&);
public:
LocationScaleImageIterator(const vector<Point>& locations, const vector<float>& scales) :
@ -714,7 +725,7 @@ float ChamferMatcher::Matching::getAngle(coordinate_t a, coordinate_t b, int& dx
float angle = atan2((float)dy,(float)dx);
if (angle<0) {
angle+=CV_PI;
angle+=(float)CV_PI;
}
return angle;

@ -72,7 +72,7 @@ namespace cv
FEATURE_SET_COMPUTE_13 = 13,
FEATURE_SET_COMPUTE_20 = 20,
FEATURE_SET_COMPUTE_21 = 21,
ATOMICS = FEATURE_SET_COMPUTE_11,
GLOBAL_ATOMICS = FEATURE_SET_COMPUTE_11,
NATIVE_DOUBLE = FEATURE_SET_COMPUTE_13
};

@ -542,7 +542,7 @@ void cv::gpu::BruteForceMatcher_GPU_base::radiusMatch(const GpuMat& queryDescs,
}
};
CV_Assert(DeviceInfo().supports(ATOMICS));
CV_Assert(DeviceInfo().supports(GLOBAL_ATOMICS));
const int nQuery = queryDescs.rows;
const int nTrain = trainDescs.rows;

@ -201,7 +201,7 @@ Scalar cv::gpu::sum(const GpuMat& src, GpuMat& buf)
ensureSizeIsEnough(buf_size, CV_8U, buf);
Caller* callers = multipass_callers;
if (TargetArchs::builtWith(ATOMICS) && DeviceInfo().supports(ATOMICS))
if (TargetArchs::builtWith(GLOBAL_ATOMICS) && DeviceInfo().supports(GLOBAL_ATOMICS))
callers = singlepass_callers;
Caller caller = callers[src.depth()];
@ -242,7 +242,7 @@ Scalar cv::gpu::absSum(const GpuMat& src, GpuMat& buf)
ensureSizeIsEnough(buf_size, CV_8U, buf);
Caller* callers = multipass_callers;
if (TargetArchs::builtWith(ATOMICS) && DeviceInfo().supports(ATOMICS))
if (TargetArchs::builtWith(GLOBAL_ATOMICS) && DeviceInfo().supports(GLOBAL_ATOMICS))
callers = singlepass_callers;
Caller caller = callers[src.depth()];
@ -278,7 +278,7 @@ Scalar cv::gpu::sqrSum(const GpuMat& src, GpuMat& buf)
sqrSumCaller<int>, sqrSumCaller<float>, 0 };
Caller* callers = multipass_callers;
if (TargetArchs::builtWith(ATOMICS) && DeviceInfo().supports(ATOMICS))
if (TargetArchs::builtWith(GLOBAL_ATOMICS) && DeviceInfo().supports(GLOBAL_ATOMICS))
callers = singlepass_callers;
Size buf_size;
@ -371,7 +371,7 @@ void cv::gpu::minMax(const GpuMat& src, double* minVal, double* maxVal, const Gp
if (mask.empty())
{
Caller* callers = multipass_callers;
if (TargetArchs::builtWith(ATOMICS) && DeviceInfo().supports(ATOMICS))
if (TargetArchs::builtWith(GLOBAL_ATOMICS) && DeviceInfo().supports(GLOBAL_ATOMICS))
callers = singlepass_callers;
Caller caller = callers[src.type()];
@ -381,7 +381,7 @@ void cv::gpu::minMax(const GpuMat& src, double* minVal, double* maxVal, const Gp
else
{
MaskedCaller* callers = masked_multipass_callers;
if (TargetArchs::builtWith(ATOMICS) && DeviceInfo().supports(ATOMICS))
if (TargetArchs::builtWith(GLOBAL_ATOMICS) && DeviceInfo().supports(GLOBAL_ATOMICS))
callers = masked_singlepass_callers;
MaskedCaller caller = callers[src.type()];
@ -474,7 +474,7 @@ void cv::gpu::minMaxLoc(const GpuMat& src, double* minVal, double* maxVal, Point
if (mask.empty())
{
Caller* callers = multipass_callers;
if (TargetArchs::builtWith(ATOMICS) && DeviceInfo().supports(ATOMICS))
if (TargetArchs::builtWith(GLOBAL_ATOMICS) && DeviceInfo().supports(GLOBAL_ATOMICS))
callers = singlepass_callers;
Caller caller = callers[src.type()];
@ -484,7 +484,7 @@ void cv::gpu::minMaxLoc(const GpuMat& src, double* minVal, double* maxVal, Point
else
{
MaskedCaller* callers = masked_multipass_callers;
if (TargetArchs::builtWith(ATOMICS) && DeviceInfo().supports(ATOMICS))
if (TargetArchs::builtWith(GLOBAL_ATOMICS) && DeviceInfo().supports(GLOBAL_ATOMICS))
callers = masked_singlepass_callers;
MaskedCaller caller = callers[src.type()];
@ -546,7 +546,7 @@ int cv::gpu::countNonZero(const GpuMat& src, GpuMat& buf)
ensureSizeIsEnough(buf_size, CV_8U, buf);
Caller* callers = multipass_callers;
if (TargetArchs::builtWith(ATOMICS) && DeviceInfo().supports(ATOMICS))
if (TargetArchs::builtWith(GLOBAL_ATOMICS) && DeviceInfo().supports(GLOBAL_ATOMICS))
callers = singlepass_callers;
Caller caller = callers[src.type()];

@ -41,6 +41,10 @@
#ifndef _ncvruntimetemplates_hpp_
#define _ncvruntimetemplates_hpp_
#if _MSC_VER >= 1200
#pragma warning( disable: 4800 )
#endif
#include <stdarg.h>
#include <vector>

@ -108,7 +108,7 @@ namespace
CV_Assert(!img.empty() && img.type() == CV_8UC1);
CV_Assert(mask.empty() || (mask.size() == img.size() && mask.type() == CV_8UC1));
CV_Assert(nOctaves > 0 && nIntervals > 2 && nIntervals < 22);
CV_Assert(DeviceInfo().supports(ATOMICS));
CV_Assert(DeviceInfo().supports(GLOBAL_ATOMICS));
max_features = static_cast<int>(img.size().area() * featuresRatio);
max_candidates = static_cast<int>(1.5 * max_features);

Loading…
Cancel
Save