Created the ptranspose packet primitive that can transpose an array of N packets, where N is the number of words in each packet. This primitive will be used to complete the vectorization of the gemm_pack_lhs and gemm_pack_rhs functions.

Implemented the primitive using SSE instructions.
This commit is contained in:
Benoit Steiner
2014-03-26 19:03:07 -07:00
parent 14bc4b9704
commit a419cea4a0
4 changed files with 61 additions and 1 deletions

View File

@@ -386,9 +386,22 @@ template<> inline std::complex<double> pmul(const std::complex<double>& a, const
#endif
/***************************************************************************
* Kernel, that is a collection of N packets where N is the number of words
* in the packet.
***************************************************************************/
template <typename Packet> struct Kernel {
Packet packet[unpacket_traits<Packet>::size];
};
template<typename Packet> EIGEN_DEVICE_FUNC inline void
ptranspose(Kernel<Packet>& /*kernel*/) {
// Nothing to do in the scalar case, i.e. a 1x1 matrix.
}
} // end namespace internal
} // end namespace Eigen
#endif // EIGEN_GENERIC_PACKET_MATH_H