| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2011 The LibYuv Project Authors. All rights reserved. | 2 * Copyright 2011 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 19 matching lines...) Expand all Loading... |
| 30 // These flags are only valid on x86 processors. | 30 // These flags are only valid on x86 processors. |
| 31 static const int kCpuHasX86 = 0x10; | 31 static const int kCpuHasX86 = 0x10; |
| 32 static const int kCpuHasSSE2 = 0x20; | 32 static const int kCpuHasSSE2 = 0x20; |
| 33 static const int kCpuHasSSSE3 = 0x40; | 33 static const int kCpuHasSSSE3 = 0x40; |
| 34 static const int kCpuHasSSE41 = 0x80; | 34 static const int kCpuHasSSE41 = 0x80; |
| 35 static const int kCpuHasSSE42 = 0x100; | 35 static const int kCpuHasSSE42 = 0x100; |
| 36 static const int kCpuHasAVX = 0x200; | 36 static const int kCpuHasAVX = 0x200; |
| 37 static const int kCpuHasAVX2 = 0x400; | 37 static const int kCpuHasAVX2 = 0x400; |
| 38 static const int kCpuHasERMS = 0x800; | 38 static const int kCpuHasERMS = 0x800; |
| 39 static const int kCpuHasFMA3 = 0x1000; | 39 static const int kCpuHasFMA3 = 0x1000; |
| 40 static const int kCpuHasAVX3 = 0x2000; // TODO(fbarchard): implement detect. |
| 40 // 0x2000, 0x4000, 0x8000 reserved for future X86 flags. | 41 // 0x2000, 0x4000, 0x8000 reserved for future X86 flags. |
| 41 | 42 |
| 42 // These flags are only valid on MIPS processors. | 43 // These flags are only valid on MIPS processors. |
| 43 static const int kCpuHasMIPS = 0x10000; | 44 static const int kCpuHasMIPS = 0x10000; |
| 44 static const int kCpuHasMIPS_DSP = 0x20000; | 45 static const int kCpuHasMIPS_DSP = 0x20000; |
| 45 static const int kCpuHasMIPS_DSPR2 = 0x40000; | 46 static const int kCpuHasMIPS_DSPR2 = 0x40000; |
| 46 | 47 |
| 47 // Internal function used to auto-init. | 48 // Internal function used to auto-init. |
| 48 LIBYUV_API | 49 LIBYUV_API |
| 49 int InitCpuFlags(void); | 50 int InitCpuFlags(void); |
| (...skipping 22 matching lines...) Expand all Loading... |
| 72 // ecx is typically the cpu number, and should normally be zero. | 73 // ecx is typically the cpu number, and should normally be zero. |
| 73 LIBYUV_API | 74 LIBYUV_API |
| 74 void CpuId(uint32 eax, uint32 ecx, uint32* cpu_info); | 75 void CpuId(uint32 eax, uint32 ecx, uint32* cpu_info); |
| 75 | 76 |
| 76 #ifdef __cplusplus | 77 #ifdef __cplusplus |
| 77 } // extern "C" | 78 } // extern "C" |
| 78 } // namespace libyuv | 79 } // namespace libyuv |
| 79 #endif | 80 #endif |
| 80 | 81 |
| 81 #endif // INCLUDE_LIBYUV_CPU_ID_H_ NOLINT | 82 #endif // INCLUDE_LIBYUV_CPU_ID_H_ NOLINT |
| OLD | NEW |