diff options
author | 2010-04-24 00:44:14 +0300 | |
---|---|---|
committer | 2010-04-24 00:44:14 +0300 | |
commit | 6972c140f737874d88da0e225c7c27b4563a4518 (patch) | |
tree | 3863bc8ca18553ea0d7ac34e8fab3aa5eda682f4 /Eigen/src/Core/GenericPacketMath.h | |
parent | e3e34b5920c9d522e53e4800218b53633df71f86 (diff) |
replaced _mm_prefetch in GeneralBlockPanelKernel.h, with ei_prefetch() inline function.
Implemented NEON and AltiVec versions, copied SSE version over from GeneralBlockPanelKernel.h.
Also in GCC case (or rather !_MSC_VER) it's implemented using __builtin_prefetch().
NEON managed to give a small but welcome boost, 0.88GFLOPS -> 0.91GFLOPS.
Diffstat (limited to 'Eigen/src/Core/GenericPacketMath.h')
-rw-r--r-- | Eigen/src/Core/GenericPacketMath.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/Eigen/src/Core/GenericPacketMath.h b/Eigen/src/Core/GenericPacketMath.h index 08981f89d..46fa5c186 100644 --- a/Eigen/src/Core/GenericPacketMath.h +++ b/Eigen/src/Core/GenericPacketMath.h @@ -169,6 +169,14 @@ template<typename Scalar, typename Packet> inline void ei_pstore(Scalar* to, con template<typename Scalar, typename Packet> inline void ei_pstoreu(Scalar* to, const Packet& from) { (*to) = from; } +/** \internal tries to do cache prefetching of \a addr */ +template<typename Scalar> inline void ei_prefetch(const Scalar* addr) +{ +#if !defined(_MSC_VER) +__builtin_prefetch(addr); +#endif +} + /** \internal \returns the first element of a packet */ template<typename Packet> inline typename ei_unpacket_traits<Packet>::type ei_pfirst(const Packet& a) { return a; } |