mirror of
https://gitlab.com/libeigen/eigen.git
synced 2026-04-10 11:34:33 +08:00
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:
@@ -435,6 +435,16 @@ EIGEN_STRONG_INLINE Packet1cd pcplxflip/*<Packet1cd>*/(const Packet1cd& x)
|
||||
return Packet1cd(preverse(x.v));
|
||||
}
|
||||
|
||||
template<> EIGEN_DEVICE_FUNC inline void
|
||||
ptranspose(Kernel<Packet2cf>& kernel) {
|
||||
__m128d w1 = _mm_castps_pd(kernel.packet[0].v);
|
||||
__m128d w2 = _mm_castps_pd(kernel.packet[1].v);
|
||||
|
||||
__m128 tmp = _mm_castpd_ps(_mm_unpackhi_pd(w1, w2));
|
||||
kernel.packet[0].v = _mm_castpd_ps(_mm_unpacklo_pd(w1, w2));
|
||||
kernel.packet[1].v = tmp;
|
||||
}
|
||||
|
||||
} // end namespace internal
|
||||
|
||||
} // end namespace Eigen
|
||||
|
||||
Reference in New Issue
Block a user