mirror of
https://github.com/opencv/opencv.git
synced 2026-11-29 04:47:04 -06:00
core: interleave SIMD pow math and combine masks 🤖🤖🤖 - #30325 Partially addresses #30324. Interleave the two independent SIMD log/exp chains used by fractional `pow` and combine their nonpositive-mask reductions. Arithmetic, scalar fallback, load widths, and alias-tail guards are preserved. On Apple M4 Max / AppleClang 21 / one thread, the RGB float32 reproduction takes **3.308 → 2.901 ms** for `p=1.5` and **3.324 → 2.956 ms** for `p=1.4` (before → after). This recovers part of the 5.x regression; parity with 5.0.0 is not established. Validation: 404 accuracy tests and 36 public performance cases pass; 84 native before/after cases are bitwise identical. Half performance outputs are converted before sanity checking. Linux performance remains unmeasured. ### Pull Request Readiness Checklist - [x] I agree to contribute under Apache 2 License. - [x] No GPL/incompatible source was used. - [x] Proposed to 5.x. - [x] Linked to the original report and related work. - [x] Accuracy and performance tests included; inputs are generated, so no opencv_extra data patch is required. - [x] No public API/documentation change; core accuracy/perf targets build locally.