| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (c) 2010 The WebM project authors. All Rights Reserved. | 2 * Copyright (c) 2010 The WebM 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 27 matching lines...) Expand all Loading... |
| 38 int core_count = 16; | 38 int core_count = 16; |
| 39 | 39 |
| 40 #if HAVE_UNISTD_H && !defined(__OS2__) | 40 #if HAVE_UNISTD_H && !defined(__OS2__) |
| 41 #if defined(_SC_NPROCESSORS_ONLN) | 41 #if defined(_SC_NPROCESSORS_ONLN) |
| 42 core_count = sysconf(_SC_NPROCESSORS_ONLN); | 42 core_count = sysconf(_SC_NPROCESSORS_ONLN); |
| 43 #elif defined(_SC_NPROC_ONLN) | 43 #elif defined(_SC_NPROC_ONLN) |
| 44 core_count = sysconf(_SC_NPROC_ONLN); | 44 core_count = sysconf(_SC_NPROC_ONLN); |
| 45 #endif | 45 #endif |
| 46 #elif defined(_WIN32) | 46 #elif defined(_WIN32) |
| 47 { | 47 { |
| 48 #if _WIN32_WINNT >= 0x0501 |
| 49 SYSTEM_INFO sysinfo; |
| 50 GetNativeSystemInfo(&sysinfo); |
| 51 #else |
| 48 PGNSI pGNSI; | 52 PGNSI pGNSI; |
| 49 SYSTEM_INFO sysinfo; | 53 SYSTEM_INFO sysinfo; |
| 50 | 54 |
| 51 /* Call GetNativeSystemInfo if supported or | 55 /* Call GetNativeSystemInfo if supported or |
| 52 * GetSystemInfo otherwise. */ | 56 * GetSystemInfo otherwise. */ |
| 53 | 57 |
| 54 pGNSI = (PGNSI) GetProcAddress( | 58 pGNSI = (PGNSI) GetProcAddress( |
| 55 GetModuleHandle(TEXT("kernel32.dll")), "GetNativeSystemInfo"); | 59 GetModuleHandle(TEXT("kernel32.dll")), "GetNativeSystemInfo"); |
| 56 if (pGNSI != NULL) | 60 if (pGNSI != NULL) |
| 57 pGNSI(&sysinfo); | 61 pGNSI(&sysinfo); |
| 58 else | 62 else |
| 59 GetSystemInfo(&sysinfo); | 63 GetSystemInfo(&sysinfo); |
| 64 #endif |
| 60 | 65 |
| 61 core_count = sysinfo.dwNumberOfProcessors; | 66 core_count = sysinfo.dwNumberOfProcessors; |
| 62 } | 67 } |
| 63 #elif defined(__OS2__) | 68 #elif defined(__OS2__) |
| 64 { | 69 { |
| 65 ULONG proc_id; | 70 ULONG proc_id; |
| 66 ULONG status; | 71 ULONG status; |
| 67 | 72 |
| 68 core_count = 0; | 73 core_count = 0; |
| 69 for (proc_id = 1; ; proc_id++) | 74 for (proc_id = 1; ; proc_id++) |
| (...skipping 20 matching lines...) Expand all Loading... |
| 90 #if CONFIG_MULTITHREAD | 95 #if CONFIG_MULTITHREAD |
| 91 ctx->processor_core_count = get_cpu_count(); | 96 ctx->processor_core_count = get_cpu_count(); |
| 92 #endif /* CONFIG_MULTITHREAD */ | 97 #endif /* CONFIG_MULTITHREAD */ |
| 93 | 98 |
| 94 #if ARCH_ARM | 99 #if ARCH_ARM |
| 95 ctx->cpu_caps = arm_cpu_caps(); | 100 ctx->cpu_caps = arm_cpu_caps(); |
| 96 #elif ARCH_X86 || ARCH_X86_64 | 101 #elif ARCH_X86 || ARCH_X86_64 |
| 97 ctx->cpu_caps = x86_simd_caps(); | 102 ctx->cpu_caps = x86_simd_caps(); |
| 98 #endif | 103 #endif |
| 99 } | 104 } |
| OLD | NEW |