Files
opencv-MIRROR/modules/core/src
pratham-mcw 95354f044c Merge pull request #27596 from pratham-mcw:core-kmeans-loop-unroll
core: ARM64 loop unrolling in kmeans to improve Weighted Filter performance #27596

### 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

- This PR improves the performance of the Weighted Filter function from the ximgproc module on Windows on ARM64.
- The optimization is achieved by unrolling two performance-critical loops in the generateCentersPP function in modules/core/src/kmeans.cpp, which is internally used by the Weighted Filter function.
- The unrolling is enabled only for ARM64 builds using #if defined(_M_ARM64) guards to preserve compatibility and maintain performance on other architectures.

**Performance Improvements:** 
- Improves execution time for Weighted Filter performance tests on ARM64 without affecting other platforms.
<img width="772" height="558" alt="image" src="https://github.com/user-attachments/assets/ae28c0af-97d3-460b-ad5a-207d3fc6936f" />
2025-09-23 15:48:10 +03:00
..
2025-06-26 14:45:19 +02:00
2024-03-05 12:15:39 +03:00
2024-03-05 12:15:39 +03:00
2018-09-07 20:33:52 +09:00
2021-03-02 23:24:28 +00:00
2019-03-05 14:47:04 +03:00
2022-03-03 07:21:53 +09:00
2019-12-27 12:46:53 +00:00
2024-03-05 12:15:39 +03:00
2024-03-05 12:15:39 +03:00
2024-03-05 12:15:39 +03:00
2025-01-13 16:34:28 +01:00
2025-06-02 10:13:49 +02:00
2025-03-24 09:21:22 +03:00
2025-03-24 09:21:22 +03:00
2024-10-11 02:18:14 +02:00
2025-01-13 16:34:28 +01:00
2021-03-02 23:24:28 +00:00
2018-02-12 14:14:08 +03:00
2018-08-27 14:42:18 +03:00
2014-08-15 12:09:16 +04:00
2024-03-05 12:15:39 +03:00
2024-03-05 12:15:39 +03:00