| OLD | NEW |
| 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 #include "SkCpu.h" | 8 #include "SkCpu.h" |
| 9 #include "SkHalf.h" | 9 #include "SkHalf.h" |
| 10 #include "SkOnce.h" | 10 #include "SkOnce.h" |
| 11 #include "SkOpts.h" | 11 #include "SkOpts.h" |
| 12 | 12 |
| 13 #if defined(SK_ARM_HAS_NEON) | 13 #if defined(SK_ARM_HAS_NEON) |
| 14 #if defined(__ARM_FEATURE_CRC32) | 14 #if defined(SK_ARM_HAS_CRC32) |
| 15 #define SK_OPTS_NS neon_and_crc32 | 15 #define SK_OPTS_NS neon_and_crc32 |
| 16 #else | 16 #else |
| 17 #define SK_OPTS_NS neon | 17 #define SK_OPTS_NS neon |
| 18 #endif | 18 #endif |
| 19 #elif SK_CPU_SSE_LEVEL >= SK_CPU_SSE_LEVEL_AVX2 | 19 #elif SK_CPU_SSE_LEVEL >= SK_CPU_SSE_LEVEL_AVX2 |
| 20 #define SK_OPTS_NS avx2 | 20 #define SK_OPTS_NS avx2 |
| 21 #elif SK_CPU_SSE_LEVEL >= SK_CPU_SSE_LEVEL_AVX | 21 #elif SK_CPU_SSE_LEVEL >= SK_CPU_SSE_LEVEL_AVX |
| 22 #define SK_OPTS_NS avx | 22 #define SK_OPTS_NS avx |
| 23 #elif SK_CPU_SSE_LEVEL >= SK_CPU_SSE_LEVEL_SSE42 | 23 #elif SK_CPU_SSE_LEVEL >= SK_CPU_SSE_LEVEL_SSE42 |
| 24 #define SK_OPTS_NS sse42 | 24 #define SK_OPTS_NS sse42 |
| (...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 111 | 111 |
| 112 #endif | 112 #endif |
| 113 #endif | 113 #endif |
| 114 } | 114 } |
| 115 | 115 |
| 116 void Init() { | 116 void Init() { |
| 117 static SkOnce once; | 117 static SkOnce once; |
| 118 once(init); | 118 once(init); |
| 119 } | 119 } |
| 120 } // namespace SkOpts | 120 } // namespace SkOpts |
| OLD | NEW |