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 275 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
286 typedef SkNx<16, SkScalar> Sk16s; | 286 typedef SkNx<16, SkScalar> Sk16s; |
287 | 287 |
288 typedef SkNx<4, uint8_t> Sk4b; | 288 typedef SkNx<4, uint8_t> Sk4b; |
289 typedef SkNx<8, uint8_t> Sk8b; | 289 typedef SkNx<8, uint8_t> Sk8b; |
290 typedef SkNx<16, uint8_t> Sk16b; | 290 typedef SkNx<16, uint8_t> Sk16b; |
291 | 291 |
292 typedef SkNx<4, uint16_t> Sk4h; | 292 typedef SkNx<4, uint16_t> Sk4h; |
293 typedef SkNx<8, uint16_t> Sk8h; | 293 typedef SkNx<8, uint16_t> Sk8h; |
294 typedef SkNx<16, uint16_t> Sk16h; | 294 typedef SkNx<16, uint16_t> Sk16h; |
295 | 295 |
296 typedef SkNx<4, int> Sk4i; | 296 typedef SkNx<4, int32_t> Sk4i; |
| 297 typedef SkNx<4, uint32_t> Sk4u; |
297 | 298 |
298 // Include platform specific specializations if available. | 299 // Include platform specific specializations if available. |
299 #if !defined(SKNX_NO_SIMD) && SK_CPU_SSE_LEVEL >= SK_CPU_SSE_LEVEL_SSE2 | 300 #if !defined(SKNX_NO_SIMD) && SK_CPU_SSE_LEVEL >= SK_CPU_SSE_LEVEL_SSE2 |
300 #include "../opts/SkNx_sse.h" | 301 #include "../opts/SkNx_sse.h" |
301 #elif !defined(SKNX_NO_SIMD) && defined(SK_ARM_HAS_NEON) | 302 #elif !defined(SKNX_NO_SIMD) && defined(SK_ARM_HAS_NEON) |
302 #include "../opts/SkNx_neon.h" | 303 #include "../opts/SkNx_neon.h" |
303 #else | 304 #else |
304 | 305 |
305 SI Sk4i Sk4f_round(const Sk4f& x) { | 306 SI Sk4i Sk4f_round(const Sk4f& x) { |
306 return { (int) lrintf (x[0]), | 307 return { (int) lrintf (x[0]), |
(...skipping 26 matching lines...) Expand all Loading... |
333 | 334 |
334 #endif | 335 #endif |
335 | 336 |
336 SI void Sk4f_ToBytes(uint8_t p[16], const Sk4f& a, const Sk4f& b, const Sk4f& c,
const Sk4f& d) { | 337 SI void Sk4f_ToBytes(uint8_t p[16], const Sk4f& a, const Sk4f& b, const Sk4f& c,
const Sk4f& d) { |
337 SkNx_cast<uint8_t>(SkNx_join(SkNx_join(a,b), SkNx_join(c,d))).store(p); | 338 SkNx_cast<uint8_t>(SkNx_join(SkNx_join(a,b), SkNx_join(c,d))).store(p); |
338 } | 339 } |
339 | 340 |
340 #undef SI | 341 #undef SI |
341 | 342 |
342 #endif//SkNx_DEFINED | 343 #endif//SkNx_DEFINED |
OLD | NEW |