extended performance tests to test 3 channels

This commit is contained in:
Ilya Lavrenov 2014-02-15 15:27:27 +04:00
parent 3542da7167
commit 7629bb78a4
3 changed files with 16 additions and 14 deletions

View File

@ -121,7 +121,7 @@ OCL_PERF_TEST_P(LogFixture, Log, ::testing::Combine(
typedef Size_MatType AddFixture; typedef Size_MatType AddFixture;
OCL_PERF_TEST_P(AddFixture, Add, OCL_PERF_TEST_P(AddFixture, Add,
::testing::Combine(OCL_TEST_SIZES, OCL_TEST_TYPES)) ::testing::Combine(OCL_TEST_SIZES, OCL_TEST_TYPES_134))
{ {
const Size srcSize = GET_PARAM(0); const Size srcSize = GET_PARAM(0);
const int type = GET_PARAM(1); const int type = GET_PARAM(1);
@ -141,7 +141,7 @@ OCL_PERF_TEST_P(AddFixture, Add,
typedef Size_MatType SubtractFixture; typedef Size_MatType SubtractFixture;
OCL_PERF_TEST_P(SubtractFixture, Subtract, OCL_PERF_TEST_P(SubtractFixture, Subtract,
::testing::Combine(OCL_TEST_SIZES, OCL_TEST_TYPES)) ::testing::Combine(OCL_TEST_SIZES, OCL_TEST_TYPES_134))
{ {
const Size_MatType_t params = GetParam(); const Size_MatType_t params = GetParam();
const Size srcSize = get<0>(params); const Size srcSize = get<0>(params);
@ -161,7 +161,7 @@ OCL_PERF_TEST_P(SubtractFixture, Subtract,
typedef Size_MatType MulFixture; typedef Size_MatType MulFixture;
OCL_PERF_TEST_P(MulFixture, Multiply, ::testing::Combine(OCL_TEST_SIZES, OCL_TEST_TYPES)) OCL_PERF_TEST_P(MulFixture, Multiply, ::testing::Combine(OCL_TEST_SIZES, OCL_TEST_TYPES_134))
{ {
const Size_MatType_t params = GetParam(); const Size_MatType_t params = GetParam();
const Size srcSize = get<0>(params); const Size srcSize = get<0>(params);
@ -182,7 +182,7 @@ OCL_PERF_TEST_P(MulFixture, Multiply, ::testing::Combine(OCL_TEST_SIZES, OCL_TES
typedef Size_MatType DivFixture; typedef Size_MatType DivFixture;
OCL_PERF_TEST_P(DivFixture, Divide, OCL_PERF_TEST_P(DivFixture, Divide,
::testing::Combine(OCL_TEST_SIZES, OCL_TEST_TYPES)) ::testing::Combine(OCL_TEST_SIZES, OCL_TEST_TYPES_134))
{ {
const Size_MatType_t params = GetParam(); const Size_MatType_t params = GetParam();
const Size srcSize = get<0>(params); const Size srcSize = get<0>(params);
@ -203,7 +203,7 @@ OCL_PERF_TEST_P(DivFixture, Divide,
typedef Size_MatType AbsDiffFixture; typedef Size_MatType AbsDiffFixture;
OCL_PERF_TEST_P(AbsDiffFixture, Absdiff, OCL_PERF_TEST_P(AbsDiffFixture, Absdiff,
::testing::Combine(OCL_TEST_SIZES, OCL_TEST_TYPES)) ::testing::Combine(OCL_TEST_SIZES, OCL_TEST_TYPES_134))
{ {
const Size_MatType_t params = GetParam(); const Size_MatType_t params = GetParam();
const Size srcSize = get<0>(params); const Size srcSize = get<0>(params);
@ -452,7 +452,7 @@ OCL_PERF_TEST_P(PhaseFixture, Phase, ::testing::Combine(
typedef Size_MatType BitwiseAndFixture; typedef Size_MatType BitwiseAndFixture;
OCL_PERF_TEST_P(BitwiseAndFixture, Bitwise_and, OCL_PERF_TEST_P(BitwiseAndFixture, Bitwise_and,
::testing::Combine(OCL_TEST_SIZES, OCL_TEST_TYPES)) ::testing::Combine(OCL_TEST_SIZES, OCL_TEST_TYPES_134))
{ {
const Size_MatType_t params = GetParam(); const Size_MatType_t params = GetParam();
const Size srcSize = get<0>(params); const Size srcSize = get<0>(params);
@ -473,7 +473,7 @@ OCL_PERF_TEST_P(BitwiseAndFixture, Bitwise_and,
typedef Size_MatType BitwiseXorFixture; typedef Size_MatType BitwiseXorFixture;
OCL_PERF_TEST_P(BitwiseXorFixture, Bitwise_xor, OCL_PERF_TEST_P(BitwiseXorFixture, Bitwise_xor,
::testing::Combine(OCL_TEST_SIZES, OCL_TEST_TYPES)) ::testing::Combine(OCL_TEST_SIZES, OCL_TEST_TYPES_134))
{ {
const Size_MatType_t params = GetParam(); const Size_MatType_t params = GetParam();
const Size srcSize = get<0>(params); const Size srcSize = get<0>(params);
@ -494,7 +494,7 @@ OCL_PERF_TEST_P(BitwiseXorFixture, Bitwise_xor,
typedef Size_MatType BitwiseOrFixture; typedef Size_MatType BitwiseOrFixture;
OCL_PERF_TEST_P(BitwiseOrFixture, Bitwise_or, OCL_PERF_TEST_P(BitwiseOrFixture, Bitwise_or,
::testing::Combine(OCL_TEST_SIZES, OCL_TEST_TYPES)) ::testing::Combine(OCL_TEST_SIZES, OCL_TEST_TYPES_134))
{ {
const Size_MatType_t params = GetParam(); const Size_MatType_t params = GetParam();
const Size srcSize = get<0>(params); const Size srcSize = get<0>(params);
@ -515,7 +515,7 @@ OCL_PERF_TEST_P(BitwiseOrFixture, Bitwise_or,
typedef Size_MatType BitwiseNotFixture; typedef Size_MatType BitwiseNotFixture;
OCL_PERF_TEST_P(BitwiseNotFixture, Bitwise_not, OCL_PERF_TEST_P(BitwiseNotFixture, Bitwise_not,
::testing::Combine(OCL_TEST_SIZES, OCL_TEST_TYPES)) ::testing::Combine(OCL_TEST_SIZES, OCL_TEST_TYPES_134))
{ {
const Size_MatType_t params = GetParam(); const Size_MatType_t params = GetParam();
const Size srcSize = get<0>(params); const Size srcSize = get<0>(params);
@ -584,7 +584,7 @@ OCL_PERF_TEST_P(PowFixture, Pow, ::testing::Combine(
typedef Size_MatType AddWeightedFixture; typedef Size_MatType AddWeightedFixture;
OCL_PERF_TEST_P(AddWeightedFixture, AddWeighted, OCL_PERF_TEST_P(AddWeightedFixture, AddWeighted,
::testing::Combine(OCL_TEST_SIZES, OCL_TEST_TYPES)) ::testing::Combine(OCL_TEST_SIZES, OCL_TEST_TYPES_134))
{ {
const Size_MatType_t params = GetParam(); const Size_MatType_t params = GetParam();
const Size srcSize = get<0>(params); const Size srcSize = get<0>(params);

View File

@ -60,7 +60,7 @@ typedef tuple<Size, MatType, InterType> WarpAffineParams;
typedef TestBaseWithParam<WarpAffineParams> WarpAffineFixture; typedef TestBaseWithParam<WarpAffineParams> WarpAffineFixture;
OCL_PERF_TEST_P(WarpAffineFixture, WarpAffine, OCL_PERF_TEST_P(WarpAffineFixture, WarpAffine,
::testing::Combine(OCL_TEST_SIZES, OCL_TEST_TYPES, InterType::all())) ::testing::Combine(OCL_TEST_SIZES, OCL_TEST_TYPES_134, InterType::all()))
{ {
static const double coeffs[2][3] = static const double coeffs[2][3] =
{ {
@ -90,7 +90,7 @@ typedef WarpAffineParams WarpPerspectiveParams;
typedef TestBaseWithParam<WarpPerspectiveParams> WarpPerspectiveFixture; typedef TestBaseWithParam<WarpPerspectiveParams> WarpPerspectiveFixture;
OCL_PERF_TEST_P(WarpPerspectiveFixture, WarpPerspective, OCL_PERF_TEST_P(WarpPerspectiveFixture, WarpPerspective,
::testing::Combine(OCL_TEST_SIZES, OCL_TEST_TYPES, InterType::all())) ::testing::Combine(OCL_TEST_SIZES, OCL_TEST_TYPES_134, InterType::all()))
{ {
static const double coeffs[3][3] = static const double coeffs[3][3] =
{ {
@ -121,7 +121,7 @@ typedef tuple<Size, MatType, InterType, double> ResizeParams;
typedef TestBaseWithParam<ResizeParams> ResizeFixture; typedef TestBaseWithParam<ResizeParams> ResizeFixture;
OCL_PERF_TEST_P(ResizeFixture, Resize, OCL_PERF_TEST_P(ResizeFixture, Resize,
::testing::Combine(OCL_TEST_SIZES, OCL_TEST_TYPES, ::testing::Combine(OCL_TEST_SIZES, OCL_TEST_TYPES_134,
InterType::all(), ::testing::Values(0.5, 2.0))) InterType::all(), ::testing::Values(0.5, 2.0)))
{ {
const ResizeParams params = GetParam(); const ResizeParams params = GetParam();
@ -146,7 +146,7 @@ typedef tuple<Size, MatType, double> ResizeAreaParams;
typedef TestBaseWithParam<ResizeAreaParams> ResizeAreaFixture; typedef TestBaseWithParam<ResizeAreaParams> ResizeAreaFixture;
OCL_PERF_TEST_P(ResizeAreaFixture, Resize, OCL_PERF_TEST_P(ResizeAreaFixture, Resize,
::testing::Combine(OCL_TEST_SIZES, OCL_TEST_TYPES, ::testing::Values(0.3, 0.5, 0.6))) ::testing::Combine(OCL_TEST_SIZES, OCL_TEST_TYPES_134, ::testing::Values(0.3, 0.5, 0.6)))
{ {
const ResizeAreaParams params = GetParam(); const ResizeAreaParams params = GetParam();
const Size srcSize = get<0>(params); const Size srcSize = get<0>(params);

View File

@ -92,6 +92,8 @@ using std::tr1::tuple;
#define OCL_TEST_SIZES ::testing::Values(OCL_SIZE_1, OCL_SIZE_2, OCL_SIZE_3, OCL_SIZE_4) #define OCL_TEST_SIZES ::testing::Values(OCL_SIZE_1, OCL_SIZE_2, OCL_SIZE_3, OCL_SIZE_4)
#define OCL_TEST_TYPES ::testing::Values(CV_8UC1, CV_32FC1, CV_8UC4, CV_32FC4) #define OCL_TEST_TYPES ::testing::Values(CV_8UC1, CV_32FC1, CV_8UC4, CV_32FC4)
#define OCL_TEST_TYPES_14 OCL_TEST_TYPES
#define OCL_TEST_TYPES_134 ::testing::Values(CV_8UC1, CV_32FC1, CV_8UC3, CV_32FC3, CV_8UC4, CV_32FC4)
#define OCL_PERF_ENUM ::testing::Values #define OCL_PERF_ENUM ::testing::Values