Merged the trunk r8589:8653 - all changes related to build warnings

This commit is contained in:
Andrey Kamaev
2012-06-15 13:04:17 +00:00
parent 73c152abc4
commit bd0e0b5800
438 changed files with 20374 additions and 19674 deletions

View File

@@ -0,0 +1,25 @@
#ifndef __main_test_nvidia_h__
#define __main_test_nvidia_h__
#include<string>
enum OutputLevel
{
OutputLevelNone,
OutputLevelCompact,
OutputLevelFull
};
bool nvidia_NPPST_Integral_Image(const std::string& test_data_path, OutputLevel outputLevel);
bool nvidia_NPPST_Squared_Integral_Image(const std::string& test_data_path, OutputLevel outputLevel);
bool nvidia_NPPST_RectStdDev(const std::string& test_data_path, OutputLevel outputLevel);
bool nvidia_NPPST_Resize(const std::string& test_data_path, OutputLevel outputLevel);
bool nvidia_NPPST_Vector_Operations(const std::string& test_data_path, OutputLevel outputLevel);
bool nvidia_NPPST_Transpose(const std::string& test_data_path, OutputLevel outputLevel);
bool nvidia_NCV_Vector_Operations(const std::string& test_data_path, OutputLevel outputLevel);
bool nvidia_NCV_Haar_Cascade_Loader(const std::string& test_data_path, OutputLevel outputLevel);
bool nvidia_NCV_Haar_Cascade_Application(const std::string& test_data_path, OutputLevel outputLevel);
bool nvidia_NCV_Hypotheses_Filtration(const std::string& test_data_path, OutputLevel outputLevel);
bool nvidia_NCV_Visualization(const std::string& test_data_path, OutputLevel outputLevel);
#endif

View File

@@ -14,13 +14,13 @@
#include <vector>
#include "NCVTest.hpp"
enum OutputLevel
{
OutputLevelNone,
OutputLevelCompact,
OutputLevelFull
};
#include <main_test_nvidia.h>
//enum OutputLevel
//{
// OutputLevelNone,
// OutputLevelCompact,
// OutputLevelFull
//};
class NCVAutoTestLister
{

View File

@@ -11,7 +11,9 @@
#ifndef _ncvtest_hpp_
#define _ncvtest_hpp_
#pragma warning( disable : 4201 4408 4127 4100)
#if defined _MSC_VER
# pragma warning( disable : 4201 4408 4127 4100)
#endif
#include <string>
#include <vector>
@@ -36,6 +38,7 @@ class INCVTest
public:
virtual bool executeTest(NCVTestReport &report) = 0;
virtual std::string getName() const = 0;
virtual ~INCVTest(){}
};

View File

@@ -21,11 +21,15 @@
#include "NCVAutoTestLister.hpp"
#include "NCVTestSourceProvider.hpp"
#include <main_test_nvidia.h>
static std::string path;
namespace {
template <class T_in, class T_out>
void generateIntegralTests(NCVAutoTestLister &testLister, NCVTestSourceProvider<T_in> &src,
void generateIntegralTests(NCVAutoTestLister &testLister,
NCVTestSourceProvider<T_in> &src,
Ncv32u maxWidth, Ncv32u maxHeight)
{
for (Ncv32f _i=1.0; _i<maxWidth; _i*=1.2f)
@@ -43,13 +47,9 @@ void generateIntegralTests(NCVAutoTestLister &testLister, NCVTestSourceProvider<
testLister.add(new TestIntegralImage<T_in, T_out>(testName, src, 2, i));
}
//test VGA
testLister.add(new TestIntegralImage<T_in, T_out>("LinIntImg_VGA", src, 640, 480));
//TODO: add tests of various resolutions up to 4096x4096
}
void generateSquaredIntegralTests(NCVAutoTestLister &testLister, NCVTestSourceProvider<Ncv8u> &src,
Ncv32u maxWidth, Ncv32u maxHeight)
{
@@ -68,13 +68,9 @@ void generateSquaredIntegralTests(NCVAutoTestLister &testLister, NCVTestSourcePr
testLister.add(new TestIntegralImageSquared(testName, src, 32, i));
}
//test VGA
testLister.add(new TestIntegralImageSquared("SqLinIntImg_VGA", src, 640, 480));
//TODO: add tests of various resolutions up to 4096x4096
}
void generateRectStdDevTests(NCVAutoTestLister &testLister, NCVTestSourceProvider<Ncv8u> &src,
Ncv32u maxWidth, Ncv32u maxHeight)
{
@@ -91,17 +87,12 @@ void generateRectStdDevTests(NCVAutoTestLister &testLister, NCVTestSourceProvide
testLister.add(new TestRectStdDev(testName, src, i-1, i*2-1, rect, 2.5, true));
}
//test VGA
testLister.add(new TestRectStdDev("RectStdDev_VGA", src, 640, 480, rect, 1, true));
//TODO: add tests of various resolutions up to 4096x4096
}
template <class T>
void generateResizeTests(NCVAutoTestLister &testLister, NCVTestSourceProvider<T> &src)
{
//test VGA
for (Ncv32u i=1; i<480; i+=3)
{
char testName[80];
@@ -110,7 +101,6 @@ void generateResizeTests(NCVAutoTestLister &testLister, NCVTestSourceProvider<T>
testLister.add(new TestResize<T>(testName, src, 640, 480, i, false));
}
//test HD
for (Ncv32u i=1; i<1080; i+=5)
{
char testName[80];
@@ -118,11 +108,8 @@ void generateResizeTests(NCVAutoTestLister &testLister, NCVTestSourceProvider<T>
testLister.add(new TestResize<T>(testName, src, 1920, 1080, i, true));
testLister.add(new TestResize<T>(testName, src, 1920, 1080, i, false));
}
//TODO: add tests of various resolutions up to 4096x4096
}
void generateNPPSTVectorTests(NCVAutoTestLister &testLister, NCVTestSourceProvider<Ncv32u> &src, Ncv32u maxLength)
{
//compaction
@@ -186,9 +173,10 @@ void generateTransposeTests(NCVAutoTestLister &testLister, NCVTestSourceProvider
testLister.add(new TestTranspose<T>("TestTranspose_reg_0", src, 1072, 375));
}
template <class T>
void generateDrawRectsTests(NCVAutoTestLister &testLister, NCVTestSourceProvider<T> &src, NCVTestSourceProvider<Ncv32u> &src32u,
void generateDrawRectsTests(NCVAutoTestLister &testLister,
NCVTestSourceProvider<T> &src,
NCVTestSourceProvider<Ncv32u> &src32u,
Ncv32u maxWidth, Ncv32u maxHeight)
{
for (Ncv32f _i=16.0; _i<maxWidth; _i*=1.1f)
@@ -215,11 +203,8 @@ void generateDrawRectsTests(NCVAutoTestLister &testLister, NCVTestSourceProvider
//test VGA
testLister.add(new TestDrawRects<T>("DrawRects_VGA", src, src32u, 640, 480, 640*480/1000, (T)0xFF));
//TODO: add tests of various resolutions up to 4096x4096
}
void generateVectorTests(NCVAutoTestLister &testLister, NCVTestSourceProvider<Ncv32u> &src, Ncv32u maxLength)
{
//growth
@@ -237,7 +222,6 @@ void generateVectorTests(NCVAutoTestLister &testLister, NCVTestSourceProvider<Nc
testLister.add(new TestHypothesesGrow("VectorGrow00b", src, 10, 42, 1.2f, 10, 0, 10, 0));
}
void generateHypothesesFiltrationTests(NCVAutoTestLister &testLister, NCVTestSourceProvider<Ncv32u> &src, Ncv32u maxLength)
{
for (Ncv32f _i=1.0; _i<maxLength; _i*=1.1f)
@@ -261,7 +245,6 @@ void generateHaarLoaderTests(NCVAutoTestLister &testLister)
testLister.add(new TestHaarCascadeLoader("haarcascade_eye_tree_eyeglasses.xml", path + "haarcascade_eye_tree_eyeglasses.xml"));
}
void generateHaarApplicationTests(NCVAutoTestLister &testLister, NCVTestSourceProvider<Ncv8u> &src,
Ncv32u maxWidth, Ncv32u maxHeight)
{
@@ -285,7 +268,6 @@ void generateHaarApplicationTests(NCVAutoTestLister &testLister, NCVTestSourcePr
static void devNullOutput(const std::string& msg)
{
}
bool nvidia_NPPST_Integral_Image(const std::string& test_data_path, OutputLevel outputLevel)
@@ -304,6 +286,8 @@ bool nvidia_NPPST_Integral_Image(const std::string& test_data_path, OutputLevel
return testListerII.invoke();
}
}
bool nvidia_NPPST_Squared_Integral_Image(const std::string& test_data_path, OutputLevel outputLevel)
{
path = test_data_path;

View File

@@ -39,6 +39,10 @@
//
//M*/
#ifdef __GNUC__
# pragma GCC diagnostic ignored "-Wmissing-declarations"
#endif
#ifndef __OPENCV_TEST_PRECOMP_HPP__
#define __OPENCV_TEST_PRECOMP_HPP__

View File

@@ -513,7 +513,6 @@ PARAM_TEST_CASE(Filter2D, cv::gpu::DeviceInfo, cv::Size, MatType, KSize, Anchor,
bool useRoi;
cv::Mat img;
cv::Mat kernel;
virtual void SetUp()
{

File diff suppressed because it is too large Load Diff

View File

@@ -39,6 +39,7 @@
//
//M*/
#include <main_test_nvidia.h>
#include "precomp.hpp"
#ifdef HAVE_CUDA
@@ -46,24 +47,12 @@
using namespace cvtest;
using namespace testing;
enum OutputLevel
{
OutputLevelNone,
OutputLevelCompact,
OutputLevelFull
};
bool nvidia_NPPST_Integral_Image(const std::string& test_data_path, OutputLevel outputLevel);
bool nvidia_NPPST_Squared_Integral_Image(const std::string& test_data_path, OutputLevel outputLevel);
bool nvidia_NPPST_RectStdDev(const std::string& test_data_path, OutputLevel outputLevel);
bool nvidia_NPPST_Resize(const std::string& test_data_path, OutputLevel outputLevel);
bool nvidia_NPPST_Vector_Operations(const std::string& test_data_path, OutputLevel outputLevel);
bool nvidia_NPPST_Transpose(const std::string& test_data_path, OutputLevel outputLevel);
bool nvidia_NCV_Vector_Operations(const std::string& test_data_path, OutputLevel outputLevel);
bool nvidia_NCV_Haar_Cascade_Loader(const std::string& test_data_path, OutputLevel outputLevel);
bool nvidia_NCV_Haar_Cascade_Application(const std::string& test_data_path, OutputLevel outputLevel);
bool nvidia_NCV_Hypotheses_Filtration(const std::string& test_data_path, OutputLevel outputLevel);
bool nvidia_NCV_Visualization(const std::string& test_data_path, OutputLevel outputLevel);
//enum OutputLevel
//{
// OutputLevelNone,
// OutputLevelCompact,
// OutputLevelFull
//};
struct NVidiaTest : TestWithParam<cv::gpu::DeviceInfo>
{
@@ -86,12 +75,12 @@ struct NCV : NVidiaTest {};
OutputLevel nvidiaTestOutputLevel = OutputLevelCompact;
TEST_P(NPPST, Integral)
{
bool res = nvidia_NPPST_Integral_Image(path, nvidiaTestOutputLevel);
//TEST_P(NPPST, Integral)
//{
// bool res = nvidia_NPPST_Integral_Image(path, nvidiaTestOutputLevel);
ASSERT_TRUE(res);
}
// ASSERT_TRUE(res);
//}
TEST_P(NPPST, SquaredIntegral)
{

View File

@@ -69,16 +69,16 @@ struct HOG : testing::TestWithParam<cv::gpu::DeviceInfo>, cv::gpu::HOGDescriptor
}
#ifdef DUMP
void dump(const cv::Mat& block_hists, const std::vector<cv::Point>& locations)
void dump(const cv::Mat& blockHists, const std::vector<cv::Point>& locations)
{
f.write((char*)&block_hists.rows, sizeof(block_hists.rows));
f.write((char*)&block_hists.cols, sizeof(block_hists.cols));
f.write((char*)&blockHists.rows, sizeof(blockHists.rows));
f.write((char*)&blockHists.cols, sizeof(blockHists.cols));
for (int i = 0; i < block_hists.rows; ++i)
for (int i = 0; i < blockHists.rows; ++i)
{
for (int j = 0; j < block_hists.cols; ++j)
for (int j = 0; j < blockHists.cols; ++j)
{
float val = block_hists.at<float>(i, j);
float val = blockHists.at<float>(i, j);
f.write((char*)&val, sizeof(val));
}
}
@@ -90,21 +90,21 @@ struct HOG : testing::TestWithParam<cv::gpu::DeviceInfo>, cv::gpu::HOGDescriptor
f.write((char*)&locations[i], sizeof(locations[i]));
}
#else
void compare(const cv::Mat& block_hists, const std::vector<cv::Point>& locations)
void compare(const cv::Mat& blockHists, const std::vector<cv::Point>& locations)
{
int rows, cols;
f.read((char*)&rows, sizeof(rows));
f.read((char*)&cols, sizeof(cols));
ASSERT_EQ(rows, block_hists.rows);
ASSERT_EQ(cols, block_hists.cols);
ASSERT_EQ(rows, blockHists.rows);
ASSERT_EQ(cols, blockHists.cols);
for (int i = 0; i < block_hists.rows; ++i)
for (int i = 0; i < blockHists.rows; ++i)
{
for (int j = 0; j < block_hists.cols; ++j)
for (int j = 0; j < blockHists.cols; ++j)
{
float val;
f.read((char*)&val, sizeof(val));
ASSERT_NEAR(val, block_hists.at<float>(i, j), 1e-3);
ASSERT_NEAR(val, blockHists.at<float>(i, j), 1e-3);
}
}