ei_pnegate implemented for AltiVec

This commit is contained in:
Konstantinos A. Margaritis 2009-03-20 17:26:50 +00:00
parent fbf415c547
commit fe00e864a1

View File

@ -103,13 +103,14 @@ template<> inline v4i ei_psub(const v4i& a, const v4i& b) { return vec_sub(
template<> EIGEN_STRONG_INLINE v4f ei_pnegate(const v4f& a)
{
v4i mask(0x80000000,0x80000000,0x80000000,0x80000000);
v4i mask = {0x80000000, 0x80000000, 0x80000000, 0x80000000};
return vec_xor(a,(v4f) mask);
}
template<> EIGEN_STRONG_INLINE v4i ei_pnegate(const v4i& a)
{
v4f zero;
return ei_psub(vec_xor(zero,zero), a);
USE_CONST_v0i;
return ei_psub(v0i, a);
}
template<> inline v4f ei_pmul(const v4f& a, const v4f& b) { USE_CONST_v0f; return vec_madd(a,b, v0f); }