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

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

Issue 1026723003: Guard SIMD code with !defined(SKNX_NO_SIMD). (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: switch 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 | « src/core/Sk2x.h ('k') | src/core/SkNx.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 #ifndef Sk4x_DEFINED 1 #ifndef Sk4x_DEFINED
2 #define Sk4x_DEFINED 2 #define Sk4x_DEFINED
3 3
4 #include "SkTypes.h" 4 #include "SkTypes.h"
5 #include "SkNx.h"
5 6
6 #define SK4X_PREAMBLE 1 7 #define SK4X_PREAMBLE 1
7 #if SK_CPU_SSE_LEVEL >= SK_CPU_SSE_LEVEL_SSE2 8 #if SK_CPU_SSE_LEVEL >= SK_CPU_SSE_LEVEL_SSE2 && !defined(SKNX_NO_SIMD)
8 #include "../opts/Sk4x_sse.h" 9 #include "../opts/Sk4x_sse.h"
9 #elif defined(SK_ARM_HAS_NEON) 10 #elif defined(SK_ARM_HAS_NEON) && !defined(SKNX_NO_SIMD)
10 #include "../opts/Sk4x_neon.h" 11 #include "../opts/Sk4x_neon.h"
11 #else 12 #else
12 #include "../opts/Sk4x_none.h" 13 #include "../opts/Sk4x_none.h"
13 #endif 14 #endif
14 #undef SK4X_PREAMBLE 15 #undef SK4X_PREAMBLE
15 16
16 template <typename T> class Sk4x; 17 template <typename T> class Sk4x;
17 typedef Sk4x<float> Sk4f; 18 typedef Sk4x<float> Sk4f;
18 typedef Sk4x<int32_t> Sk4i; 19 typedef Sk4x<int32_t> Sk4i;
19 20
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
74 75
75 // TODO: these are particularly efficient in SSE. Useful? Also efficient i n NEON? 76 // TODO: these are particularly efficient in SSE. Useful? Also efficient i n NEON?
76 // static Sk4x XAYB(const Sk4x& xyzw, const Sk4x& abcd); 77 // static Sk4x XAYB(const Sk4x& xyzw, const Sk4x& abcd);
77 // static Sk4x ZCWD(const Sk4x& xyzw, const Sk4x& abcd); 78 // static Sk4x ZCWD(const Sk4x& xyzw, const Sk4x& abcd);
78 79
79 private: 80 private:
80 // It's handy to have Sk4f and Sk4i be mutual friends. 81 // It's handy to have Sk4f and Sk4i be mutual friends.
81 template <typename S> friend class Sk4x; 82 template <typename S> friend class Sk4x;
82 83
83 #define SK4X_PRIVATE 1 84 #define SK4X_PRIVATE 1
84 #if SK_CPU_SSE_LEVEL >= SK_CPU_SSE_LEVEL_SSE2 85 #if SK_CPU_SSE_LEVEL >= SK_CPU_SSE_LEVEL_SSE2 && !defined(SKNX_NO_SIMD)
85 #include "../opts/Sk4x_sse.h" 86 #include "../opts/Sk4x_sse.h"
86 #elif defined(SK_ARM_HAS_NEON) 87 #elif defined(SK_ARM_HAS_NEON) && !defined(SKNX_NO_SIMD)
87 #include "../opts/Sk4x_neon.h" 88 #include "../opts/Sk4x_neon.h"
88 #else 89 #else
89 #include "../opts/Sk4x_none.h" 90 #include "../opts/Sk4x_none.h"
90 #endif 91 #endif
91 #undef SK4X_PRIVATE 92 #undef SK4X_PRIVATE
92 }; 93 };
93 94
94 #if SK_CPU_SSE_LEVEL >= SK_CPU_SSE_LEVEL_SSE2 95 #if SK_CPU_SSE_LEVEL >= SK_CPU_SSE_LEVEL_SSE2 && !defined(SKNX_NO_SIMD)
95 #include "../opts/Sk4x_sse.h" 96 #include "../opts/Sk4x_sse.h"
96 #elif defined(SK_ARM_HAS_NEON) 97 #elif defined(SK_ARM_HAS_NEON) && !defined(SKNX_NO_SIMD)
97 #include "../opts/Sk4x_neon.h" 98 #include "../opts/Sk4x_neon.h"
98 #else 99 #else
99 #include "../opts/Sk4x_none.h" 100 #include "../opts/Sk4x_none.h"
100 #endif 101 #endif
101 102
102 #endif//Sk4x_DEFINED 103 #endif//Sk4x_DEFINED
OLDNEW
« no previous file with comments | « src/core/Sk2x.h ('k') | src/core/SkNx.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698