mirror of
https://gitlab.com/libeigen/eigen.git
synced 2025-03-07 18:27:40 +08:00
clean the commented asm instructions because now I'm sure
the previous fix is ok
This commit is contained in:
parent
f2737148b0
commit
5ba7fe3bee
@ -76,17 +76,14 @@ template<> struct ei_unpacket_traits<Packet4i> { typedef int type; enum {size
|
|||||||
|
|
||||||
#ifdef __GNUC__
|
#ifdef __GNUC__
|
||||||
// Sometimes GCC implements _mm_set1_p* using multiple moves,
|
// Sometimes GCC implements _mm_set1_p* using multiple moves,
|
||||||
// that is inefficient :(
|
// that is inefficient :( (e.g., see ei_gemm_pack_rhs)
|
||||||
// TODO make sure the new solution using the shuffle/unpacklo is ok
|
|
||||||
template<> EIGEN_STRONG_INLINE Packet4f ei_pset1<float>(const float& from) {
|
template<> EIGEN_STRONG_INLINE Packet4f ei_pset1<float>(const float& from) {
|
||||||
Packet4f res = _mm_set_ss(from);
|
Packet4f res = _mm_set_ss(from);
|
||||||
return _mm_shuffle_ps(res,res,0);
|
return _mm_shuffle_ps(res,res,0);
|
||||||
//asm("shufps $0, %[x], %[x]" : [x] "+x" (res) : );
|
|
||||||
}
|
}
|
||||||
template<> EIGEN_STRONG_INLINE Packet2d ei_pset1<double>(const double& from) {
|
template<> EIGEN_STRONG_INLINE Packet2d ei_pset1<double>(const double& from) {
|
||||||
Packet2d res = _mm_set_sd(from);
|
Packet2d res = _mm_set_sd(from);
|
||||||
return _mm_unpacklo_pd(res,res);
|
return _mm_unpacklo_pd(res,res);
|
||||||
// asm("unpcklpd %[x], %[x]" : [x] "+x" (res) : );
|
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
template<> EIGEN_STRONG_INLINE Packet4f ei_pset1<float>(const float& from) { return _mm_set1_ps(from); }
|
template<> EIGEN_STRONG_INLINE Packet4f ei_pset1<float>(const float& from) { return _mm_set1_ps(from); }
|
||||||
|
Loading…
Reference in New Issue
Block a user