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;
fs[2] == 6 &&
fs[3] == 7 &&
fs[4] == 8);
+
+ // Load2 and store2().
+ float two[2] = { 1.0f, 2.0f };
+ Sk4f twoIn4f = Sk4f::Load2(two);
+ twoIn4f = twoIn4f.multiply(Sk4f(2.0f));
+ twoIn4f.store2(two);
+
+ REPORTER_ASSERT(r, two[0] == 2.0f);
+ REPORTER_ASSERT(r, two[1] == 4.0f);
}
DEF_TEST(Sk4x_Conversions, r) {