aboutsummaryrefslogtreecommitdiffhomepage
path: root/Eigen
diff options
context:
space:
mode:
authorGravatar Gael Guennebaud <g.gael@free.fr>2009-01-27 19:08:20 +0000
committerGravatar Gael Guennebaud <g.gael@free.fr>2009-01-27 19:08:20 +0000
commit4ac8cabf8a645b9a296ab97110ff39d91a9f1916 (patch)
treebb422d31b60b5f03a95c7b97e998f769cef3a318 /Eigen
parent9b06e072a5354ba1ac0d7a4836e81c43880ea5f6 (diff)
fix my previous commit with EIGEN_EMPTY macro bug
Diffstat (limited to 'Eigen')
-rw-r--r--Eigen/src/Core/CacheFriendlyProduct.h14
-rw-r--r--Eigen/src/Core/util/Macros.h3
2 files changed, 11 insertions, 6 deletions
diff --git a/Eigen/src/Core/CacheFriendlyProduct.h b/Eigen/src/Core/CacheFriendlyProduct.h
index f86f00dd2..73c9730d6 100644
--- a/Eigen/src/Core/CacheFriendlyProduct.h
+++ b/Eigen/src/Core/CacheFriendlyProduct.h
@@ -366,8 +366,10 @@ static EIGEN_DONT_INLINE void ei_cache_friendly_product_colmajor_times_vector(
ei_pstore(&res[j OFFSET], \
ei_padd(ei_pload(&res[j OFFSET]), \
ei_padd( \
- ei_padd(ei_pmul(ptmp0,ei_pload ## A0(&lhs0[j OFFSET])),ei_pmul(ptmp1,ei_pload ## A13(&lhs1[j OFFSET]))), \
- ei_padd(ei_pmul(ptmp2,ei_pload ## A2(&lhs2[j OFFSET])),ei_pmul(ptmp3,ei_pload ## A13(&lhs3[j OFFSET]))) )))
+ ei_padd(ei_pmul(ptmp0,EIGEN_CAT(ei_pload , A0)(&lhs0[j OFFSET])), \
+ ei_pmul(ptmp1,EIGEN_CAT(ei_pload , A13)(&lhs1[j OFFSET]))), \
+ ei_padd(ei_pmul(ptmp2,EIGEN_CAT(ei_pload , A2)(&lhs2[j OFFSET])), \
+ ei_pmul(ptmp3,EIGEN_CAT(ei_pload , A13)(&lhs3[j OFFSET]))) )))
typedef typename ei_packet_traits<Scalar>::type Packet;
const int PacketSize = sizeof(Packet)/sizeof(Scalar);
@@ -552,10 +554,10 @@ static EIGEN_DONT_INLINE void ei_cache_friendly_product_rowmajor_times_vector(
#define _EIGEN_ACCUMULATE_PACKETS(A0,A13,A2,OFFSET) {\
Packet b = ei_pload(&rhs[j]); \
- ptmp0 = ei_pmadd(b, ei_pload##A0 (&lhs0[j]), ptmp0); \
- ptmp1 = ei_pmadd(b, ei_pload##A13(&lhs1[j]), ptmp1); \
- ptmp2 = ei_pmadd(b, ei_pload##A2 (&lhs2[j]), ptmp2); \
- ptmp3 = ei_pmadd(b, ei_pload##A13(&lhs3[j]), ptmp3); }
+ ptmp0 = ei_pmadd(b, EIGEN_CAT(ei_pload,A0) (&lhs0[j]), ptmp0); \
+ ptmp1 = ei_pmadd(b, EIGEN_CAT(ei_pload,A13)(&lhs1[j]), ptmp1); \
+ ptmp2 = ei_pmadd(b, EIGEN_CAT(ei_pload,A2) (&lhs2[j]), ptmp2); \
+ ptmp3 = ei_pmadd(b, EIGEN_CAT(ei_pload,A13)(&lhs3[j]), ptmp3); }
typedef typename ei_packet_traits<Scalar>::type Packet;
const int PacketSize = sizeof(Packet)/sizeof(Scalar);
diff --git a/Eigen/src/Core/util/Macros.h b/Eigen/src/Core/util/Macros.h
index a7137cc03..86ae068b1 100644
--- a/Eigen/src/Core/util/Macros.h
+++ b/Eigen/src/Core/util/Macros.h
@@ -168,6 +168,9 @@ using Eigen::ei_cos;
// just an empty macro !
#define EIGEN_EMPTY
+#define EIGEN_CAT2(a,b) a ## b
+#define EIGEN_CAT(a,b) EIGEN_CAT2(a,b)
+
// format used in Eigen's documentation
// needed to define it here as escaping characters in CMake add_definition's argument seems very problematic.
#define EIGEN_DOCS_IO_FORMAT IOFormat(3, AlignCols, " ", "\n", "", "")