Commit f4f6f85a authored by Berenger Bramas's avatar Berenger Bramas

Update altivec -- add initializer list construct

parent 7308e61b
......@@ -21,6 +21,7 @@
#undef pixel
#include <cmath>
#include <initializer_list>
// Forward declarations
template <class RealType>
......@@ -196,6 +197,11 @@ public:
return *this;
}
// Constructor from vec
inline InaVecALTIVEC(const std::initializer_list<double> lst)
: InaVecALTIVEC(lst.begin()){
}
inline void setFromScalar(const double val){
vec = vec_splats(val);
}
......
......@@ -20,6 +20,8 @@
#undef vector
#undef pixel
#include <initializer_list>
// Forward declarations
template <class RealType>
class InaVecMaskALTIVEC;
......@@ -188,6 +190,11 @@ public:
return *this;
}
// Constructor from vec
inline InaVecALTIVEC(const std::initializer_list<float> lst)
: InaVecALTIVEC(lst.begin()){
}
inline void setFromScalar(const float val){
vec = vec_splats(val);
}
......
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