Created a NEON version of the ptranspose packet primitives

This commit is contained in:
Benoit Steiner
2014-04-23 18:22:10 -07:00
parent 82b09fcb91
commit ccb4dec719
2 changed files with 30 additions and 1 deletions

View File

@@ -263,6 +263,14 @@ template<> EIGEN_STRONG_INLINE Packet2cf pdiv<Packet2cf>(const Packet2cf& a, con
return Packet2cf(pdiv(res.v, vaddq_f32(s,rev_s)));
}
template<> EIGEN_DEVICE_FUNC inline void
ptranspose(Kernel<Packet2cf>& kernel) {
float32x4_t tmp = vcombine_f32(vget_high_f32(kernel.packet[0].v), vget_high_f32(kernel.packet[1].v));
kernel.packet[0].v = vcombine_f32(vget_low_f32(kernel.packet[0].v), vget_low_f32(kernel.packet[1].v));
kernel.packet[1].v = tmp;
}
} // end namespace internal
} // end namespace Eigen