Skip to content

Added countNonZero test for big arrays#17455

Merged
opencv-pushbot merged 1 commit intoopencv:3.4from
mshabunin:check-count-non-zero
Jun 4, 2020
Merged

Added countNonZero test for big arrays#17455
opencv-pushbot merged 1 commit intoopencv:3.4from
mshabunin:check-count-non-zero

Conversation

@mshabunin
Copy link
Copy Markdown
Contributor

@mshabunin mshabunin commented Jun 2, 2020

resolves #17453

force_builders=Linux AVX2,Custom
buildworker:Custom=linux-3
build_image:Custom=ubuntu:18.04
CPU_BASELINE:Custom=AVX512_SKX
Xdisable_ipp=ON

@asmorkalov asmorkalov added category: core pr: reproducer Reproduces some bug, not expected to be merged labels Jun 3, 2020
@vpisarev
Copy link
Copy Markdown
Contributor

vpisarev commented Jun 3, 2020

@mshabunin, as we adding this test, I would also add:

EXPECT_EQ(524190-1, cv::countNonZero(cv::Mat::ones(1, 524190 - 1, CV_8UC1)));
EXPECT_EQ(524190, cv::countNonZero(cv::Mat::ones(1, 524190, CV_8UC1)));
EXPECT_EQ(524190+1, cv::countNonZero(cv::Mat::ones(1, 524190 + 1, CV_8UC1)));

which would be another good check for SIMD implementation (including the pure code in OpenCV w/o IPP), since we are also counting intermediate results in 16-bit arithmetics.

@mshabunin mshabunin force-pushed the check-count-non-zero branch from c873a98 to 5960890 Compare June 3, 2020 15:59
Copy link
Copy Markdown
Member

@alalek alalek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

@opencv-pushbot opencv-pushbot merged commit dbbfa00 into opencv:3.4 Jun 4, 2020
@alalek alalek mentioned this pull request Jun 4, 2020
@mshabunin mshabunin deleted the check-count-non-zero branch July 14, 2020 17:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

countNonZero returns wrong counts for unit8_t arrays with large dimensions (IPP)

5 participants