| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2015 Google Inc. | 2 * Copyright 2015 Google Inc. |
| 3 * | 3 * |
| 4 * Use of this source code is governed by a BSD-style license that can be | 4 * Use of this source code is governed by a BSD-style license that can be |
| 5 * found in the LICENSE file. | 5 * found in the LICENSE file. |
| 6 */ | 6 */ |
| 7 | 7 |
| 8 #ifndef SkNx_DEFINED | 8 #ifndef SkNx_DEFINED |
| 9 #define SkNx_DEFINED | 9 #define SkNx_DEFINED |
| 10 | 10 |
| (...skipping 219 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 230 typedef SkNx< 8, uint16_t> Sk8h; | 230 typedef SkNx< 8, uint16_t> Sk8h; |
| 231 typedef SkNx<16, uint16_t> Sk16h; | 231 typedef SkNx<16, uint16_t> Sk16h; |
| 232 | 232 |
| 233 typedef SkNx< 4, uint8_t> Sk4b; | 233 typedef SkNx< 4, uint8_t> Sk4b; |
| 234 typedef SkNx< 8, uint8_t> Sk8b; | 234 typedef SkNx< 8, uint8_t> Sk8b; |
| 235 typedef SkNx<16, uint8_t> Sk16b; | 235 typedef SkNx<16, uint8_t> Sk16b; |
| 236 | 236 |
| 237 typedef SkNx<4, int> Sk4i; | 237 typedef SkNx<4, int> Sk4i; |
| 238 | 238 |
| 239 // Include platform specific specializations if available. | 239 // Include platform specific specializations if available. |
| 240 #if !defined(SKNX_NO_SIMD) && SK_CPU_SSE_LEVEL >= SK_CPU_SSE_LEVEL_AVX | 240 #if !defined(SKNX_NO_SIMD) && SK_CPU_SSE_LEVEL >= SK_CPU_SSE_LEVEL_SSE2 |
| 241 #include "../opts/SkNx_avx.h" | |
| 242 #elif !defined(SKNX_NO_SIMD) && SK_CPU_SSE_LEVEL >= SK_CPU_SSE_LEVEL_SSE2 | |
| 243 #include "../opts/SkNx_sse.h" | 241 #include "../opts/SkNx_sse.h" |
| 244 #elif !defined(SKNX_NO_SIMD) && defined(SK_ARM_HAS_NEON) | 242 #elif !defined(SKNX_NO_SIMD) && defined(SK_ARM_HAS_NEON) |
| 245 #include "../opts/SkNx_neon.h" | 243 #include "../opts/SkNx_neon.h" |
| 246 #else | 244 #else |
| 247 static inline | 245 static inline |
| 248 void Sk4f_ToBytes(uint8_t p[16], const Sk4f& a, const Sk4f& b, const Sk4f& c
, const Sk4f& d) { | 246 void Sk4f_ToBytes(uint8_t p[16], const Sk4f& a, const Sk4f& b, const Sk4f& c
, const Sk4f& d) { |
| 249 SkNx_cast<uint8_t>(a).store(p+ 0); | 247 SkNx_cast<uint8_t>(a).store(p+ 0); |
| 250 SkNx_cast<uint8_t>(b).store(p+ 4); | 248 SkNx_cast<uint8_t>(b).store(p+ 4); |
| 251 SkNx_cast<uint8_t>(c).store(p+ 8); | 249 SkNx_cast<uint8_t>(c).store(p+ 8); |
| 252 SkNx_cast<uint8_t>(d).store(p+12); | 250 SkNx_cast<uint8_t>(d).store(p+12); |
| 253 } | 251 } |
| 254 #endif | 252 #endif |
| 255 | 253 |
| 256 #undef REQUIRE | 254 #undef REQUIRE |
| 257 | 255 |
| 258 | 256 |
| 259 #endif//SkNx_DEFINED | 257 #endif//SkNx_DEFINED |
| OLD | NEW |