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

Side by Side Diff: src/opts/SkNx_sse.h

Issue 2046213002: Revert of Move immintrin/arm_neon includes to where they are used. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 years, 6 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 | « src/opts/SkNx_neon.h ('k') | src/opts/SkSwizzler_opts.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 /* 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_sse_DEFINED 8 #ifndef SkNx_sse_DEFINED
9 #define SkNx_sse_DEFINED 9 #define SkNx_sse_DEFINED
10 10
11 #include "SkCpu.h" 11 #include "SkCpu.h"
12 #include <immintrin.h>
13 12
14 // This file may assume <= SSE2, but must check SK_CPU_SSE_LEVEL for anything mo re recent. 13 // This file may assume <= SSE2, but must check SK_CPU_SSE_LEVEL for anything mo re recent.
15 // If you do, make sure this is in a static inline function... anywhere else ris ks violating ODR. 14 // If you do, make sure this is in a static inline function... anywhere else ris ks violating ODR.
16 15
17 #define SKNX_IS_FAST 16 #define SKNX_IS_FAST
18 17
19 template <> 18 template <>
20 class SkNx<2, float> { 19 class SkNx<2, float> {
21 public: 20 public:
22 SkNx(const __m128& vec) : fVec(vec) {} 21 SkNx(const __m128& vec) : fVec(vec) {}
(...skipping 342 matching lines...) Expand 10 before | Expand all | Expand 10 after
365 364
366 template<> /*static*/ inline Sk4h SkNx_cast<uint16_t, uint8_t>(const Sk4b& src) { 365 template<> /*static*/ inline Sk4h SkNx_cast<uint16_t, uint8_t>(const Sk4b& src) {
367 return _mm_unpacklo_epi8(src.fVec, _mm_setzero_si128()); 366 return _mm_unpacklo_epi8(src.fVec, _mm_setzero_si128());
368 } 367 }
369 368
370 template<> /*static*/ inline Sk4b SkNx_cast<uint8_t, uint16_t>(const Sk4h& src) { 369 template<> /*static*/ inline Sk4b SkNx_cast<uint8_t, uint16_t>(const Sk4h& src) {
371 return _mm_packus_epi16(src.fVec, src.fVec); 370 return _mm_packus_epi16(src.fVec, src.fVec);
372 } 371 }
373 372
374 #endif//SkNx_sse_DEFINED 373 #endif//SkNx_sse_DEFINED
OLDNEW
« no previous file with comments | « src/opts/SkNx_neon.h ('k') | src/opts/SkSwizzler_opts.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698