Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(673)

Side by Side Diff: src/core/Sk4x_neon.h

Issue 1004693002: Add #include first in Sk4x_* files (Closed) Base URL: https://skia.googlesource.com/skia@master
Patch Set: Created 5 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | src/core/Sk4x_portable.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
OLDNEW
« no previous file with comments | « no previous file | src/core/Sk4x_portable.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698