OLD | NEW |
1 // It is important _not_ to put header guards here. | 1 // It is important _not_ to put header guards here. |
2 // This file will be intentionally included three times. | 2 // This file will be intentionally included three times. |
3 | 3 |
| 4 #include "SkTypes.h" // Keep this before any #ifdef for skbug.com/3362 |
| 5 |
4 #if defined(SK4X_PREAMBLE) | 6 #if defined(SK4X_PREAMBLE) |
5 #include <arm_neon.h> | 7 #include <arm_neon.h> |
6 | 8 |
7 // Template metaprogramming to map scalar types to vector types. | 9 // Template metaprogramming to map scalar types to vector types. |
8 template <typename T> struct SkScalarToSIMD; | 10 template <typename T> struct SkScalarToSIMD; |
9 template <> struct SkScalarToSIMD<float> { typedef float32x4_t Type; }; | 11 template <> struct SkScalarToSIMD<float> { typedef float32x4_t Type; }; |
10 template <> struct SkScalarToSIMD<int32_t> { typedef int32x4_t Type; }; | 12 template <> struct SkScalarToSIMD<int32_t> { typedef int32x4_t Type; }; |
11 | 13 |
12 #elif defined(SK4X_PRIVATE) | 14 #elif defined(SK4X_PRIVATE) |
13 Sk4x(float32x4_t); | 15 Sk4x(float32x4_t); |
(...skipping 197 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
211 } | 213 } |
212 M(Sk4i) ZWCD(const Sk4i& xyzw, const Sk4i& abcd) { | 214 M(Sk4i) ZWCD(const Sk4i& xyzw, const Sk4i& abcd) { |
213 int32x4x2_t xayb_zcwd = vzipq_s32(xyzw.fVec, abcd.fVec); | 215 int32x4x2_t xayb_zcwd = vzipq_s32(xyzw.fVec, abcd.fVec); |
214 int32x4x2_t axby_czdw = vzipq_s32(abcd.fVec, xyzw.fVec); | 216 int32x4x2_t axby_czdw = vzipq_s32(abcd.fVec, xyzw.fVec); |
215 return vuzpq_s32(xayb_zcwd.val[1], axby_czdw.val[1]).val[0]; | 217 return vuzpq_s32(xayb_zcwd.val[1], axby_czdw.val[1]).val[0]; |
216 } | 218 } |
217 | 219 |
218 #undef M | 220 #undef M |
219 | 221 |
220 #endif | 222 #endif |
OLD | NEW |