Download modules/core/perf/perf_bitwise.cpp from tgollogly/test: direct link, hf CLI and curl.
- Browser
- Download file 1.79 kB
-
https://huggingface.co/tgollogly/test/resolve/main/modules/core/perf/perf_bitwise.cpp
- Command line
-
hf download hf://tgollogly/test/modules/core/perf/perf_bitwise.cpp
-
curl -L -o perf_bitwise.cpp https://huggingface.co/tgollogly/test/resolve/main/modules/core/perf/perf_bitwise.cpp
1.79 kB
| namespace opencv_test | |
| { | |
| using namespace perf; | |
| PERF_TEST_P(Size_MatType, bitwise_not, TYPICAL_MATS_BITW_ARITHM) | |
| { | |
| Size sz = get<0>(GetParam()); | |
| int type = get<1>(GetParam()); | |
| cv::Mat a = Mat(sz, type); | |
| cv::Mat c = Mat(sz, type); | |
| declare.in(a, WARMUP_RNG).out(c); | |
| declare.iterations(200); | |
| TEST_CYCLE() cv::bitwise_not(a, c); | |
| SANITY_CHECK(c); | |
| } | |
| PERF_TEST_P(Size_MatType, bitwise_and, TYPICAL_MATS_BITW_ARITHM) | |
| { | |
| Size sz = get<0>(GetParam()); | |
| int type = get<1>(GetParam()); | |
| cv::Mat a = Mat(sz, type); | |
| cv::Mat b = Mat(sz, type); | |
| cv::Mat c = Mat(sz, type); | |
| declare.in(a, b, WARMUP_RNG).out(c); | |
| declare.time(100); | |
| TEST_CYCLE() bitwise_and(a, b, c); | |
| SANITY_CHECK(c); | |
| } | |
| PERF_TEST_P(Size_MatType, bitwise_or, TYPICAL_MATS_BITW_ARITHM) | |
| { | |
| Size sz = get<0>(GetParam()); | |
| int type = get<1>(GetParam()); | |
| cv::Mat a = Mat(sz, type); | |
| cv::Mat b = Mat(sz, type); | |
| cv::Mat c = Mat(sz, type); | |
| declare.in(a, b, WARMUP_RNG).out(c); | |
| declare.time(100); | |
| TEST_CYCLE() bitwise_or(a, b, c); | |
| SANITY_CHECK(c); | |
| } | |
| PERF_TEST_P(Size_MatType, bitwise_xor, TYPICAL_MATS_BITW_ARITHM) | |
| { | |
| Size sz = get<0>(GetParam()); | |
| int type = get<1>(GetParam()); | |
| cv::Mat a = Mat(sz, type); | |
| cv::Mat b = Mat(sz, type); | |
| cv::Mat c = Mat(sz, type); | |
| declare.in(a, b, WARMUP_RNG).out(c); | |
| declare.time(100); | |
| TEST_CYCLE() bitwise_xor(a, b, c); | |
| SANITY_CHECK(c); | |
| } | |
| } // namespace | |