aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar Gael Guennebaud <g.gael@free.fr>2008-08-21 14:03:17 +0000
committerGravatar Gael Guennebaud <g.gael@free.fr>2008-08-21 14:03:17 +0000
commit67813e01bf4c10adf413bdac057043f44c2439d7 (patch)
tree5cb9cb0ed477778dba4254ab2a235b25f6f6c567
parentf729fc1d70e69d547bd5bd48678823dd9580bb7e (diff)
disable the vectorization of div for AltiVec
-rw-r--r--Eigen/src/Core/Functors.h4
-rw-r--r--test/packetmath.cpp2
2 files changed, 5 insertions, 1 deletions
diff --git a/Eigen/src/Core/Functors.h b/Eigen/src/Core/Functors.h
index e868f2eee..b911200d9 100644
--- a/Eigen/src/Core/Functors.h
+++ b/Eigen/src/Core/Functors.h
@@ -141,8 +141,10 @@ struct ei_functor_traits<ei_scalar_quotient_op<Scalar> > {
enum {
Cost = 2 * NumTraits<Scalar>::MulCost,
PacketAccess = ei_packet_traits<Scalar>::size>1
- #ifdef EIGEN_VECTORIZE_SSE
+ #if (defined EIGEN_VECTORIZE_SSE)
&& NumTraits<Scalar>::HasFloatingPoint
+ #elif (defined EIGEN_VECTORIZE_ALTIVEC)
+ && 0
#endif
};
};
diff --git a/test/packetmath.cpp b/test/packetmath.cpp
index c282762d6..12226fe2f 100644
--- a/test/packetmath.cpp
+++ b/test/packetmath.cpp
@@ -108,8 +108,10 @@ template<typename Scalar> void packetmath()
CHECK_CWISE(REF_ADD, ei_padd);
CHECK_CWISE(REF_SUB, ei_psub);
CHECK_CWISE(REF_MUL, ei_pmul);
+ #ifndef EIGEN_VECTORIZE_ALTIVEC
if (!ei_is_same_type<Scalar,int>::ret)
CHECK_CWISE(REF_DIV, ei_pdiv);
+ #endif
CHECK_CWISE(std::min, ei_pmin);
CHECK_CWISE(std::max, ei_pmax);