Unbreak -Fast bot.
authorMike Klein <mtklein@chromium.org>
Sat, 15 Oct 2016 05:18:45 +0000 (01:18 -0400)
committerMike Klein <mtklein@chromium.org>
Sat, 15 Oct 2016 05:39:27 +0000 (05:39 +0000)
CQ_INCLUDE_TRYBOTS=master.client.skia:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD-Trybot,Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-Fast-Trybot

GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=3423

Change-Id: I1875c86b785da4483038c10715af7827b7d71f0b
Reviewed-on: https://skia-review.googlesource.com/3423
Reviewed-by: Mike Klein <mtklein@chromium.org>
Commit-Queue: Mike Klein <mtklein@chromium.org>

src/opts/SkNx_sse.h

index 25fb0b7a8dff2cf072bf2a281a03781f56f74ce9..b79fe9a8846d7e568f9691871e647e8f5ffe92ce 100644 (file)
@@ -16,6 +16,9 @@
 #define SKNX_IS_FAST
 
 template <> struct SkNx_abi<4,float> { __m128 vec; };
+#if SK_CPU_SSE_LEVEL >= SK_CPU_SSE_LEVEL_AVX2
+    template <> struct SkNx_abi<8,float> { __m256 vec; };
+#endif
 
 namespace {
 
@@ -558,6 +561,9 @@ public:
         I SkNx(float a, float b, float c, float d,
                float e, float f, float g, float h) : fVec(_mm256_setr_ps(a,b,c,d,e,f,g,h)) {}
 
+        SkNx(const SkNx_abi<8,float>& a) : fVec(a.vec) {}
+        operator SkNx_abi<8,float>() const { return { fVec }; }
+
         I static SkNx Load(const void* ptr) { return _mm256_loadu_ps((const float*)ptr); }
         I void store(void* ptr) const { _mm256_storeu_ps((float*)ptr, fVec); }