gapi_operators_tests_cpu.cpp 3.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. // This file is part of OpenCV project.
  2. // It is subject to the license terms in the LICENSE file found in the top-level directory
  3. // of this distribution and at http://opencv.org/license.html.
  4. //
  5. // Copyright (C) 2018 Intel Corporation
  6. #include "../test_precomp.hpp"
  7. #include "../common/gapi_operators_tests.hpp"
  8. #include <opencv2/gapi/cpu/core.hpp>
  9. namespace
  10. {
  11. #define CORE_CPU [] () { return cv::compile_args(cv::gapi::use_only{cv::gapi::core::cpu::kernels()}); }
  12. } // anonymous namespace
  13. namespace opencv_test
  14. {
  15. // FIXME: CPU test runs are disabled since Fluid is an exclusive plugin now!
  16. INSTANTIATE_TEST_CASE_P(MathOperatorTestCPU, MathOperatorMatMatTest,
  17. Combine(Values(CV_8UC1, CV_16SC1, CV_32FC1),
  18. Values(cv::Size(1280, 720),
  19. cv::Size(640, 480),
  20. cv::Size(128, 128)),
  21. Values(-1),
  22. Values(CORE_CPU),
  23. Values(AbsExact().to_compare_obj()),
  24. Values( ADD, SUB, DIV,
  25. GT, LT, GE, LE, EQ, NE)));
  26. INSTANTIATE_TEST_CASE_P(MathOperatorTestCPU, MathOperatorMatScalarTest,
  27. Combine(Values(CV_8UC1, CV_16SC1, CV_32FC1),
  28. Values(cv::Size(1280, 720),
  29. cv::Size(640, 480),
  30. cv::Size(128, 128)),
  31. Values(-1),
  32. Values(CORE_CPU),
  33. Values(AbsExact().to_compare_obj()),
  34. Values( ADD, SUB, MUL, DIV,
  35. ADDR, SUBR, MULR, DIVR,
  36. GT, LT, GE, LE, EQ, NE,
  37. GTR, LTR, GER, LER, EQR, NER)));
  38. INSTANTIATE_TEST_CASE_P(BitwiseOperatorTestCPU, MathOperatorMatMatTest,
  39. Combine(Values(CV_8UC1, CV_16UC1, CV_16SC1),
  40. Values(cv::Size(1280, 720),
  41. cv::Size(640, 480),
  42. cv::Size(128, 128)),
  43. Values(-1),
  44. Values(CORE_CPU),
  45. Values(AbsExact().to_compare_obj()),
  46. Values( AND, OR, XOR )));
  47. INSTANTIATE_TEST_CASE_P(BitwiseOperatorTestCPU, MathOperatorMatScalarTest,
  48. Combine(Values(CV_8UC1, CV_16UC1, CV_16SC1),
  49. Values(cv::Size(1280, 720),
  50. cv::Size(640, 480),
  51. cv::Size(128, 128)),
  52. Values(-1),
  53. Values(CORE_CPU),
  54. Values(AbsExact().to_compare_obj()),
  55. Values( AND, OR, XOR,
  56. ANDR, ORR, XORR )));
  57. INSTANTIATE_TEST_CASE_P(BitwiseNotOperatorTestCPU, NotOperatorTest,
  58. Combine(Values(CV_8UC1, CV_16UC1, CV_16SC1),
  59. Values(cv::Size(1280, 720),
  60. cv::Size(640, 480),
  61. cv::Size(128, 128)),
  62. Values(-1),
  63. Values(CORE_CPU)));
  64. }