mirror of
https://github.com/opencv/opencv.git
synced 2026-09-29 04:09:43 +03:00
add ARMPL HAL backend for cv::invert(DECOMP_LU) - #30035 ## Summary - Adds an ARM Performance Library (ArmPL) HAL backend for cv::invert under DECOMP_LU (cv_hal_LU32f / cv_hal_LU64f), replacing OpenCV's default LU decomposition path with ArmPL's LAPACKE_sgesv / LAPACKE_dgesv for float and double matrices on AArch64. ## Changes **hal/armpl/include/armpl_hal_core.hpp:** - Declare armpl_hal_LU32f / armpl_hal_LU64f and register them as cv_hal_LU32f / cv_hal_LU64f. hal/armpl/src/armpl_hal_core.cpp: - Add armpl_lu() function (works for both float and double), that does the LU decomposition of the matrix: - If a right-hand side b is given, then LAPACKE_sgesv/dgesv is called. - If no right-hand side is given, it only factorizes the matrix using LAPACKE_sgetrf/dgetrf - Fall back to OpenCV's default (non-HAL) implementation for small matrices (m < 100). ## Performance Benchmarks <img width="1001" height="105" alt="image" src="https://github.com/user-attachments/assets/ba18378c-24da-4d20-9819-3b4398cad6e2" /> <img width="1002" height="105" alt="image" src="https://github.com/user-attachments/assets/ff33d421-b95d-4fca-aad0-ab7bc035d49b" /> <img width="999" height="108" alt="image" src="https://github.com/user-attachments/assets/d4abb57e-6be0-4ea1-9894-d30074c9429c" />