aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/core/Sk4x.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/core/Sk4x.h b/src/core/Sk4x.h
index 0b9796db9b..401bbd857b 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;