Merge pull request #25682 from fengyuentau:calib3d/lapack_fix_calib3d

calib3d: fix data type for ilp64 lapack
This commit is contained in:
Alexander Smorkalov 2024-05-31 19:24:26 +03:00 committed by GitHub
commit 08107957d8
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 9 additions and 0 deletions

View File

@ -155,7 +155,12 @@ public:
const auto &eigen_vectors = eigen_solver.eigenvectors();
const auto &eigen_values = eigen_solver.eigenvalues();
#else
#if defined (ACCELERATE_NEW_LAPACK) && defined (ACCELERATE_LAPACK_ILP64)
long mat_order = 27, info, lda = 27, ldvl = 1, ldvr = 27, lwork = 500;
#else
int mat_order = 27, info, lda = 27, ldvl = 1, ldvr = 27, lwork = 500;
#endif
double wr[27], wi[27] = {0}; // 27 = mat_order
std::vector<double> work(lwork), eig_vecs(729);
char jobvl = 'N', jobvr = 'V'; // only left eigen vectors are computed

View File

@ -259,7 +259,11 @@ public:
action_mat_data[83] = -1.0; // 8 row, 3 col
action_mat_data[96] = -1.0; // 9 row, 6 col
#if defined (ACCELERATE_NEW_LAPACK) && defined (ACCELERATE_LAPACK_ILP64)
long mat_order = 10, info, lda = 10, ldvl = 10, ldvr = 1, lwork = 100;
#else
int mat_order = 10, info, lda = 10, ldvl = 10, ldvr = 1, lwork = 100;
#endif
double wr[10], wi[10] = {0}, eig_vecs[100], work[100]; // 10 = mat_order, 100 = lwork
char jobvl = 'V', jobvr = 'N'; // only left eigen vectors are computed
OCV_LAPACK_FUNC(dgeev)(&jobvl, &jobvr, &mat_order, action_mat_data, &lda, wr, wi, eig_vecs, &ldvl,