From 67813e01bf4c10adf413bdac057043f44c2439d7 Mon Sep 17 00:00:00 2001 From: Gael Guennebaud Date: Thu, 21 Aug 2008 14:03:17 +0000 Subject: disable the vectorization of div for AltiVec --- Eigen/src/Core/Functors.h | 4 +++- test/packetmath.cpp | 2 ++ 2 files changed, 5 insertions(+), 1 deletion(-) 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 > { enum { Cost = 2 * NumTraits::MulCost, PacketAccess = ei_packet_traits::size>1 - #ifdef EIGEN_VECTORIZE_SSE + #if (defined EIGEN_VECTORIZE_SSE) && NumTraits::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 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::ret) CHECK_CWISE(REF_DIV, ei_pdiv); + #endif CHECK_CWISE(std::min, ei_pmin); CHECK_CWISE(std::max, ei_pmax); -- cgit v1.2.3