mirror of
https://github.com/opencv/opencv.git
synced 2026-07-29 07:13:02 +04:00
ab0def4854
The existing 2-pass cross-check implementation requires both forward and reverse distance computations on GPU, followed by CPU-side filtering. This adds a single-pass kernel using int64 atomics to eliminate the reverse pass. The BruteForceMatch_CrossCheckMatch kernel performs forward matching and tracks best train->query mappings in one GPU pass, reducing memory transfers. Falls back to 2-pass approach on devices without cl_khr_int64_base_atomics extension. Tested on NVIDIA RTX 5060 Ti: 1.65x-1.97x faster than 2-pass GPU, 3.49x-7.33x faster than CPU at 640x480 to 1920x1080 resolutions.