From 26c242ab58cabd0f136545285304a334db791c6b Mon Sep 17 00:00:00 2001 From: Blake Date: Thu, 29 Jan 2026 16:50:27 +0000 Subject: [PATCH] make EIGEN_BLAS macro names consistent and undef at end of file libeigen/eigen!2119 Closes #2954 --- .../GeneralMatrixMatrixTriangular_BLAS.h | 2 ++ .../Core/products/GeneralMatrixMatrix_BLAS.h | 19 ++++++++++--------- .../Core/products/GeneralMatrixVector_BLAS.h | 2 ++ .../products/SelfadjointMatrixMatrix_BLAS.h | 4 ++++ .../products/SelfadjointMatrixVector_BLAS.h | 2 ++ .../products/TriangularMatrixMatrix_BLAS.h | 4 ++++ .../products/TriangularMatrixVector_BLAS.h | 3 +++ .../products/TriangularSolverMatrix_BLAS.h | 2 ++ 8 files changed, 29 insertions(+), 9 deletions(-) diff --git a/Eigen/src/Core/products/GeneralMatrixMatrixTriangular_BLAS.h b/Eigen/src/Core/products/GeneralMatrixMatrixTriangular_BLAS.h index 6817cc09f..c1df8564f 100644 --- a/Eigen/src/Core/products/GeneralMatrixMatrixTriangular_BLAS.h +++ b/Eigen/src/Core/products/GeneralMatrixMatrixTriangular_BLAS.h @@ -141,6 +141,8 @@ EIGEN_BLAS_RANKUPDATE_R(float, float, ssyrk_) // EIGEN_BLAS_RANKUPDATE_C(dcomplex, double, double, zherk_) // EIGEN_BLAS_RANKUPDATE_C(scomplex, float, float, cherk_) +#undef EIGEN_BLAS_RANKUPDATE_SPECIALIZE +#undef EIGEN_BLAS_RANKUPDATE_R } // end namespace internal } // end namespace Eigen diff --git a/Eigen/src/Core/products/GeneralMatrixMatrix_BLAS.h b/Eigen/src/Core/products/GeneralMatrixMatrix_BLAS.h index 913beb696..11c29b604 100644 --- a/Eigen/src/Core/products/GeneralMatrixMatrix_BLAS.h +++ b/Eigen/src/Core/products/GeneralMatrixMatrix_BLAS.h @@ -49,7 +49,7 @@ namespace internal { // gemm specialization -#define GEMM_SPECIALIZATION(EIGTYPE, EIGPREFIX, BLASTYPE, BLASFUNC) \ +#define EIGEN_BLAS_GEMM_SPECIALIZATION(EIGTYPE, EIGPREFIX, BLASTYPE, BLASFUNC) \ template \ struct general_matrix_matrix_product { \ @@ -105,15 +105,15 @@ namespace internal { }; #ifdef EIGEN_USE_MKL -GEMM_SPECIALIZATION(double, d, double, dgemm) -GEMM_SPECIALIZATION(float, f, float, sgemm) -GEMM_SPECIALIZATION(dcomplex, cd, MKL_Complex16, zgemm) -GEMM_SPECIALIZATION(scomplex, cf, MKL_Complex8, cgemm) +EIGEN_BLAS_GEMM_SPECIALIZATION(double, d, double, dgemm) +EIGEN_BLAS_GEMM_SPECIALIZATION(float, f, float, sgemm) +EIGEN_BLAS_GEMM_SPECIALIZATION(dcomplex, cd, MKL_Complex16, zgemm) +EIGEN_BLAS_GEMM_SPECIALIZATION(scomplex, cf, MKL_Complex8, cgemm) #else -GEMM_SPECIALIZATION(double, d, double, dgemm_) -GEMM_SPECIALIZATION(float, f, float, sgemm_) -GEMM_SPECIALIZATION(dcomplex, cd, double, zgemm_) -GEMM_SPECIALIZATION(scomplex, cf, float, cgemm_) +EIGEN_BLAS_GEMM_SPECIALIZATION(double, d, double, dgemm_) +EIGEN_BLAS_GEMM_SPECIALIZATION(float, f, float, sgemm_) +EIGEN_BLAS_GEMM_SPECIALIZATION(dcomplex, cd, double, zgemm_) +EIGEN_BLAS_GEMM_SPECIALIZATION(scomplex, cf, float, cgemm_) #endif // If OpenBLAS with BUILD_BFLOAT16=1 support is available, @@ -198,6 +198,7 @@ struct general_matrix_matrix_product