Index: src/core/Sk4x.h |
diff --git a/src/core/Sk4x.h b/src/core/Sk4x.h |
index 0b9796db9b9bb1e42ee23606e27f3f9deeb4952a..401bbd857b1ce176c3820ecb8d87f0a15180019c 100644 |
--- a/src/core/Sk4x.h |
+++ b/src/core/Sk4x.h |
@@ -37,6 +37,18 @@ public: |
void store (T[4]) const; |
void storeAligned(T[4]) const; |
+ // Experimental! |
+ static Sk4x Load2(const T src[2]) { |
+ const T padded[4] = { src[0], src[1], 0, 0 }; |
+ return Load(padded); |
+ } |
+ void store2(T dst[2]) const { |
+ T padded[4]; |
+ this->store(padded); |
+ dst[0] = padded[0]; |
+ dst[1] = padded[1]; |
+ } |
+ |
template <typename Dst> Dst reinterpret() const; |
template <typename Dst> Dst cast() const; |