aboutsummaryrefslogtreecommitdiffhomepage
path: root/Eigen/src/Core/products
diff options
context:
space:
mode:
authorGravatar Gael Guennebaud <g.gael@free.fr>2014-02-24 17:12:17 +0100
committerGravatar Gael Guennebaud <g.gael@free.fr>2014-02-24 17:12:17 +0100
commit21fecd5252061c05cfb9f91e4e9becf25089949d (patch)
tree48671b3cb1772d2901f673065908961198fad7ff /Eigen/src/Core/products
parent6fecb6f1b6d17883525f3f34dd5c1860faeecbd8 (diff)
Workaround clang ABI change with unsed arguments (ugly fix)
Diffstat (limited to 'Eigen/src/Core/products')
-rw-r--r--Eigen/src/Core/products/GeneralBlockPanelKernel.h12
-rw-r--r--Eigen/src/Core/products/GeneralMatrixVector.h31
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<Scalar, Index, Pack1, Pack2, StorageOrder,
EIGEN_ASM_COMMENT("EIGEN PRODUCT PACK LHS");
eigen_assert(((!PanelMode) && stride==0 && offset==0) || (PanelMode && stride>=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<NumTraits<Scalar>::IsComplex && Conjugate> cj;
const_blas_data_mapper<Scalar, Index, StorageOrder> lhs(_lhs,lhsStride);
Index count = 0;
@@ -1216,6 +1220,10 @@ EIGEN_DONT_INLINE void gemm_pack_rhs<Scalar, Index, nr, ColMajor, Conjugate, Pan
{
EIGEN_ASM_COMMENT("EIGEN PRODUCT PACK RHS COLMAJOR");
eigen_assert(((!PanelMode) && stride==0 && offset==0) || (PanelMode && stride>=depth && offset<=stride));
+#ifdef __clang__
+ // Workaround clang ABI change with unsed arguments
+ if(!PanelMode) depth += stride + offset;
+#endif
conj_if<NumTraits<Scalar>::IsComplex && Conjugate> cj;
Index packet_cols = (cols/nr) * nr;
Index count = 0;
@@ -1267,6 +1275,10 @@ EIGEN_DONT_INLINE void gemm_pack_rhs<Scalar, Index, nr, RowMajor, Conjugate, Pan
{
EIGEN_ASM_COMMENT("EIGEN PRODUCT PACK RHS ROWMAJOR");
eigen_assert(((!PanelMode) && stride==0 && offset==0) || (PanelMode && stride>=depth && offset<=stride));
+#ifdef __clang__
+ // Workaround clang ABI change with unsed arguments
+ if(!PanelMode) depth += stride + offset;
+#endif
conj_if<NumTraits<Scalar>::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<typename Index, typename LhsScalar, bool ConjugateLhs, typename RhsScalar, bool ConjugateRhs, int Version>
@@ -92,13 +89,17 @@ EIGEN_DONT_INLINE void general_matrix_vector_product<Index,LhsScalar,ColMajor,Co
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)
{
eigen_internal_assert(resIncr==1);
+#ifdef __clang__
+ // Workaround clang ABI change with unsed arguments
+ lhsStride += resIncr - 1;
+#else
+ EIGEN_UNUSED_VARIABLE(resIncr);
+#endif
+
#ifdef _EIGEN_ACCUMULATE_PACKETS
#error _EIGEN_ACCUMULATE_PACKETS has already been defined
#endif
@@ -350,7 +351,7 @@ EIGEN_DONT_INLINE static void run(
Index rows, Index cols,
const LhsScalar* lhs, Index lhsStride,
const RhsScalar* rhs, Index rhsIncr,
- ResScalar* res, Index resIncr,
+ ResScalar* res, Index resIncr,
ResScalar alpha);
};
@@ -362,8 +363,14 @@ EIGEN_DONT_INLINE void general_matrix_vector_product<Index,LhsScalar,RowMajor,Co
ResScalar* res, Index resIncr,
ResScalar alpha)
{
- EIGEN_UNUSED_VARIABLE(rhsIncr);
eigen_internal_assert(rhsIncr==1);
+#ifdef __clang__
+ // Workaround clang ABI change with unsed arguments
+ lhsStride += rhsIncr - 1;
+#else
+ EIGEN_UNUSED_VARIABLE(rhsIncr);
+#endif
+
#ifdef _EIGEN_ACCUMULATE_PACKETS
#error _EIGEN_ACCUMULATE_PACKETS has already been defined
#endif