From 21fecd5252061c05cfb9f91e4e9becf25089949d Mon Sep 17 00:00:00 2001 From: Gael Guennebaud Date: Mon, 24 Feb 2014 17:12:17 +0100 Subject: [PATCH] Workaround clang ABI change with unsed arguments (ugly fix) --- .../Core/products/GeneralBlockPanelKernel.h | 12 +++++++ Eigen/src/Core/products/GeneralMatrixVector.h | 31 ++++++++++++------- 2 files changed, 31 insertions(+), 12 deletions(-) diff --git a/Eigen/src/Core/products/GeneralBlockPanelKernel.h b/Eigen/src/Core/products/GeneralBlockPanelKernel.h index 780fa74d3..10cd34e9e 100644 --- a/Eigen/src/Core/products/GeneralBlockPanelKernel.h +++ b/Eigen/src/Core/products/GeneralBlockPanelKernel.h @@ -1130,6 +1130,10 @@ EIGEN_DONT_INLINE void gemm_pack_lhs=depth && offset<=stride)); eigen_assert( (StorageOrder==RowMajor) || ((Pack1%PacketSize)==0 && Pack1<=4*PacketSize) ); +#ifdef __clang__ + // Workaround clang ABI change with unsed arguments + if(!PanelMode) depth += stride + offset; +#endif conj_if::IsComplex && Conjugate> cj; const_blas_data_mapper lhs(_lhs,lhsStride); Index count = 0; @@ -1216,6 +1220,10 @@ EIGEN_DONT_INLINE void gemm_pack_rhs=depth && offset<=stride)); +#ifdef __clang__ + // Workaround clang ABI change with unsed arguments + if(!PanelMode) depth += stride + offset; +#endif conj_if::IsComplex && Conjugate> cj; Index packet_cols = (cols/nr) * nr; Index count = 0; @@ -1267,6 +1275,10 @@ EIGEN_DONT_INLINE void gemm_pack_rhs=depth && offset<=stride)); +#ifdef __clang__ + // Workaround clang ABI change with unsed arguments + if(!PanelMode) depth += stride + offset; +#endif conj_if::IsComplex && Conjugate> cj; Index packet_cols = (cols/nr) * nr; Index count = 0; diff --git a/Eigen/src/Core/products/GeneralMatrixVector.h b/Eigen/src/Core/products/GeneralMatrixVector.h index c8697c913..c3e1e7142 100644 --- a/Eigen/src/Core/products/GeneralMatrixVector.h +++ b/Eigen/src/Core/products/GeneralMatrixVector.h @@ -80,11 +80,8 @@ EIGEN_DONT_INLINE static void run( Index rows, Index cols, const LhsScalar* lhs, Index lhsStride, const RhsScalar* rhs, Index rhsIncr, - ResScalar* res, Index - #ifdef EIGEN_INTERNAL_DEBUGGING - resIncr - #endif - , RhsScalar alpha); + ResScalar* res, Index resIncr, + RhsScalar alpha); }; template @@ -92,13 +89,17 @@ EIGEN_DONT_INLINE void general_matrix_vector_product