1
0
mirror of https://github.com/opencv/opencv.git synced 2026-07-21 19:33:03 +04:00

Merge pull request #29379 from amd:fix_warning_minmaxloc

fix MSVC warning for minMaxIdx_simd #29379

### Pull Request Readiness Checklist

See details at https://github.com/opencv/opencv/wiki/How_to_contribute#making-a-good-pull-request

- [x] I agree to contribute to the project under Apache 2 License.
- [x] To the best of my knowledge, the proposed patch is not based on a code under GPL or another license that is incompatible with OpenCV
- [x] The PR is proposed to the proper branch
- [ ] There is a reference to the original bug report and related work
- [x] There is accuracy test, performance test and test data in opencv_extra repository, if applicable
      Patch to opencv_extra has the same branch name.
- [x] The feature is well documented and sample code can be built with the project CMake
This commit is contained in:
Madan mohan Manokar
2026-06-25 18:21:33 +05:30
committed by GitHub
parent 74a25df87e
commit 8dcaac1ac4
+1 -1
View File
@@ -273,7 +273,7 @@ static void minMaxIdx_simd_(const T* src, const uchar* mask, WT* minval, WT* max
const IT none = mm_set<IT>((IST)~(IST)0);
// Reduce before the per-lane index could reach the 'none' sentinel.
// For >= 32-bit indices (len <= INT_MAX) one block covers everything.
const int64_t idxcap = (sizeof(IST) <= 2) ? (((int64_t)1 << (8 * (int)sizeof(IST))) - 1) : (int64_t)INT_MAX;
const int64_t idxcap = (sizeof(IST) <= 2) ? (int64_t)std::numeric_limits<IST>::max() : (int64_t)INT_MAX;
const int blockStep = (int)((idxcap / nlanes) * nlanes);
const IT inc2 = mm_set<IT>((IST)(nlanes * 2));