Commit a3c17f56 authored by Berenger Bramas's avatar Berenger Bramas

Update vec classes -- use splat(0) instead of xor

parent 9cc20435
...@@ -61,14 +61,12 @@ public: ...@@ -61,14 +61,12 @@ public:
// Bool data type compatibility // Bool data type compatibility
inline explicit InaVecMaskALTIVEC(const bool inBool){ inline explicit InaVecMaskALTIVEC(const bool inBool){
const __vector __bool long long tmpMaskFF = reinterpret_cast<__vector __bool long long>(vec_splats(0xFFFFFFFFFFFFFFFFUL)); const __vector __bool long long tmpMaskFF = reinterpret_cast<__vector __bool long long>(vec_splats(0xFFFFFFFFFFFFFFFFUL));
mask = (inBool? tmpMaskFF : reinterpret_cast<__vector __bool long long>(vec_xor(reinterpret_cast<__vector unsigned int>(mask), mask = (inBool? tmpMaskFF : reinterpret_cast<__vector __bool long long>(vec_splats(0x0UL)));
reinterpret_cast<__vector unsigned int>(mask))));
} }
inline InaVecMaskALTIVEC& operator=(const bool inBool){ inline InaVecMaskALTIVEC& operator=(const bool inBool){
const __vector __bool long long tmpMaskFF = reinterpret_cast<__vector __bool long long>(vec_splats(0xFFFFFFFFFFFFFFFFUL)); const __vector __bool long long tmpMaskFF = reinterpret_cast<__vector __bool long long>(vec_splats(0xFFFFFFFFFFFFFFFFUL));
mask = (inBool? tmpMaskFF : reinterpret_cast<__vector __bool long long>(vec_xor(reinterpret_cast<__vector unsigned int>(mask), mask = (inBool? tmpMaskFF : reinterpret_cast<__vector __bool long long>(vec_splats(0x0UL)));
reinterpret_cast<__vector unsigned int>(mask))));
return (*this); return (*this);
} }
......
...@@ -60,12 +60,12 @@ public: ...@@ -60,12 +60,12 @@ public:
// Bool data type compatibility // Bool data type compatibility
inline explicit InaVecMaskALTIVEC(const bool inBool){ inline explicit InaVecMaskALTIVEC(const bool inBool){
const __vector __bool int tmpMaskFF = reinterpret_cast<__vector __bool int>(vec_splats(0xFFFFFFFFU)); const __vector __bool int tmpMaskFF = reinterpret_cast<__vector __bool int>(vec_splats(0xFFFFFFFFU));
mask = (inBool? tmpMaskFF : vec_xor(tmpMaskFF, tmpMaskFF)); mask = (inBool? tmpMaskFF : reinterpret_cast<__vector __bool int>(vec_splats(0x0U)));
} }
inline InaVecMaskALTIVEC& operator=(const bool inBool){ inline InaVecMaskALTIVEC& operator=(const bool inBool){
const __vector __bool int tmpMaskFF = reinterpret_cast<__vector __bool int>(vec_splats(0xFFFFFFFFU)); const __vector __bool int tmpMaskFF = reinterpret_cast<__vector __bool int>(vec_splats(0xFFFFFFFFU));
mask = (inBool? tmpMaskFF : vec_xor(tmpMaskFF, tmpMaskFF)); mask = (inBool? tmpMaskFF : reinterpret_cast<__vector __bool int>(vec_splats(0x0U)));
return (*this); return (*this);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment