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 // Useful reading: | 4 // Useful reading: |
5 // https://software.intel.com/sites/landingpage/IntrinsicsGuide/ | 5 // https://software.intel.com/sites/landingpage/IntrinsicsGuide/ |
6 | 6 |
| 7 #include "SkTypes.h" // Keep this before any #ifdef for skbug.com/3362 |
| 8 |
7 #if defined(SK4X_PREAMBLE) | 9 #if defined(SK4X_PREAMBLE) |
8 // Code in this file may assume SSE and SSE2. | 10 // Code in this file may assume SSE and SSE2. |
9 #include <emmintrin.h> | 11 #include <emmintrin.h> |
10 | 12 |
11 // It must check for later instruction sets. | 13 // It must check for later instruction sets. |
12 #if SK_CPU_SSE_LEVEL >= SK_CPU_SSE_LEVEL_SSE41 | 14 #if SK_CPU_SSE_LEVEL >= SK_CPU_SSE_LEVEL_SSE41 |
13 #include <immintrin.h> | 15 #include <immintrin.h> |
14 #endif | 16 #endif |
15 | 17 |
16 // A little bit of template metaprogramming to map | 18 // A little bit of template metaprogramming to map |
(...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
173 } | 175 } |
174 M(Sk4i) Max(const Sk4i& a, const Sk4i& b) { | 176 M(Sk4i) Max(const Sk4i& a, const Sk4i& b) { |
175 Sk4i less = a.lessThan(b); | 177 Sk4i less = a.lessThan(b); |
176 return b.bitAnd(less).bitOr(a.andNot(less)); | 178 return b.bitAnd(less).bitOr(a.andNot(less)); |
177 } | 179 } |
178 #endif | 180 #endif |
179 | 181 |
180 #undef M | 182 #undef M |
181 | 183 |
182 #endif//Method definitions. | 184 #endif//Method definitions. |
OLD | NEW |