mirror of
https://gitlab.com/libeigen/eigen.git
synced 2026-04-10 11:34:33 +08:00
1)provide a better generic paddsub op implementation
2)make paddsub op support the Packet2cf/Packet4f/Packet2f in NEON 3)make paddsub op support the Packet2cf/Packet4f in SSE
This commit is contained in:
committed by
Rasmus Munk Larsen
parent
352f1422d3
commit
38ae5353ab
@@ -407,6 +407,12 @@ pabs(const unsigned long& a) { return a; }
|
||||
template<> EIGEN_DEVICE_FUNC inline unsigned long long
|
||||
pabs(const unsigned long long& a) { return a; }
|
||||
|
||||
/** \internal \returns the addsub value of \a a,b */
|
||||
template<typename Packet> EIGEN_DEVICE_FUNC inline Packet
|
||||
paddsub(const Packet& a, const Packet& b) {
|
||||
return pselect(peven_mask(a), padd(a, b), psub(a, b));
|
||||
}
|
||||
|
||||
/** \internal \returns the phase angle of \a a */
|
||||
template<typename Packet> EIGEN_DEVICE_FUNC inline Packet
|
||||
parg(const Packet& a) { using numext::arg; return arg(a); }
|
||||
|
||||
Reference in New Issue
Block a user