-
Notifications
You must be signed in to change notification settings - Fork 152
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
There is a problem with max and min #349
Comments
No worries, I could translate! I will answer in English, so you can pick your favorite translation engine! I can confirm, this is a bug in the implementation of uint8_t a[32]{0, 10, 250};
std::cout << (int)Vc::schar_v((signed char*)a).max() << '\n'; // correctly returns 10
std::cout << (int)Vc::uchar_v(a).max() << '\n'; // returns 10, should be 250 See: https://godbolt.org/z/8K6Yb3oYv. Would you like to provide us with a pull request? Otherwise, I can fix it myself. |
我不太会pull请求,您可以自己修复它。 |
实际上min也有问题,不过我当时只列出了max的测试,抱歉! |
Reopen, because of remaining issue with clang. |
最新的Vc版本的Vc/sse/Detail.h中看到min(__m128i,uchar)和max(__m128i,uchar)中出现了问题,函数中应该使用的是min(__m128i,__m128i,uchar())或max(__m128i,__m128i,uchar()),而实际使用的是schar()
测试如下:
https://godbolt.org/z/eEYjYTrnf
The text was updated successfully, but these errors were encountered: