OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2013 The LibYuv Project Authors. All rights reserved. | 2 * Copyright 2013 The LibYuv Project Authors. All rights reserved. |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license | 4 * Use of this source code is governed by a BSD-style license |
5 * that can be found in the LICENSE file in the root of the source | 5 * that can be found in the LICENSE file in the root of the source |
6 * tree. An additional intellectual property rights grant can be found | 6 * tree. An additional intellectual property rights grant can be found |
7 * in the file PATENTS. All contributing project authors may | 7 * in the file PATENTS. All contributing project authors may |
8 * be found in the AUTHORS file in the root of the source tree. | 8 * be found in the AUTHORS file in the root of the source tree. |
9 */ | 9 */ |
10 | 10 |
(...skipping 18 matching lines...) Expand all Loading... |
29 #define VISUALC_HAS_AVX2 1 | 29 #define VISUALC_HAS_AVX2 1 |
30 #endif // VisualStudio >= 2012 | 30 #endif // VisualStudio >= 2012 |
31 | 31 |
32 // clang >= 3.4.0 required for AVX2. | 32 // clang >= 3.4.0 required for AVX2. |
33 #if defined(__clang__) && (defined(__x86_64__) || defined(__i386__)) | 33 #if defined(__clang__) && (defined(__x86_64__) || defined(__i386__)) |
34 #if (__clang_major__ > 3) || (__clang_major__ == 3 && (__clang_minor__ >= 4)) | 34 #if (__clang_major__ > 3) || (__clang_major__ == 3 && (__clang_minor__ >= 4)) |
35 #define CLANG_HAS_AVX2 1 | 35 #define CLANG_HAS_AVX2 1 |
36 #endif // clang >= 3.4 | 36 #endif // clang >= 3.4 |
37 #endif // __clang__ | 37 #endif // __clang__ |
38 | 38 |
39 #if defined(_M_IX86) && (defined(VISUALC_HAS_AVX2) || defined(CLANG_HAS_AVX2)) | 39 #if !defined(LIBYUV_DISABLE_X86) && \ |
| 40 defined(_M_IX86) && (defined(VISUALC_HAS_AVX2) || defined(CLANG_HAS_AVX2)) |
40 #define HAS_HASHDJB2_AVX2 | 41 #define HAS_HASHDJB2_AVX2 |
41 #endif | 42 #endif |
42 | 43 |
43 // The following are available for Visual C and GCC: | 44 // The following are available for Visual C and GCC: |
44 #if !defined(LIBYUV_DISABLE_X86) && \ | 45 #if !defined(LIBYUV_DISABLE_X86) && \ |
45 (defined(__x86_64__) || (defined(__i386__) || defined(_M_IX86))) | 46 (defined(__x86_64__) || (defined(__i386__) || defined(_M_IX86))) |
46 #define HAS_HASHDJB2_SSE41 | 47 #define HAS_HASHDJB2_SSE41 |
47 #define HAS_SUMSQUAREERROR_SSE2 | 48 #define HAS_SUMSQUAREERROR_SSE2 |
48 #endif | 49 #endif |
49 | 50 |
(...skipping 18 matching lines...) Expand all Loading... |
68 uint32 HashDjb2_C(const uint8* src, int count, uint32 seed); | 69 uint32 HashDjb2_C(const uint8* src, int count, uint32 seed); |
69 uint32 HashDjb2_SSE41(const uint8* src, int count, uint32 seed); | 70 uint32 HashDjb2_SSE41(const uint8* src, int count, uint32 seed); |
70 uint32 HashDjb2_AVX2(const uint8* src, int count, uint32 seed); | 71 uint32 HashDjb2_AVX2(const uint8* src, int count, uint32 seed); |
71 | 72 |
72 #ifdef __cplusplus | 73 #ifdef __cplusplus |
73 } // extern "C" | 74 } // extern "C" |
74 } // namespace libyuv | 75 } // namespace libyuv |
75 #endif | 76 #endif |
76 | 77 |
77 #endif // INCLUDE_LIBYUV_COMPARE_ROW_H_ NOLINT | 78 #endif // INCLUDE_LIBYUV_COMPARE_ROW_H_ NOLINT |
OLD | NEW |