cpu_features_wrapper.h revision 4e51691e58d8d32590b03c1951cb13de4d1c4758
1/*
2 *  Copyright (c) 2011 The WebRTC project authors. All Rights Reserved.
3 *
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
6 *  tree. An additional intellectual property rights grant can be found
7 *  in the file PATENTS.  All contributing project authors may
8 *  be found in the AUTHORS file in the root of the source tree.
9 */
10
11#ifndef WEBRTC_SYSTEM_WRAPPERS_INTERFACE_CPU_FEATURES_WRAPPER_H_
12#define WEBRTC_SYSTEM_WRAPPERS_INTERFACE_CPU_FEATURES_WRAPPER_H_
13
14#if defined(__cplusplus) || defined(c_plusplus)
15extern "C" {
16#endif
17
18// list of features.
19typedef enum {
20  kSSE2,
21  kSSE3
22} CPUFeature;
23
24typedef int (*WebRtc_CPUInfo)(CPUFeature feature);
25// returns true if the CPU supports the feature.
26extern WebRtc_CPUInfo WebRtc_GetCPUInfo;
27// No CPU feature is available => straight C path.
28extern WebRtc_CPUInfo WebRtc_GetCPUInfoNoASM;
29
30#if defined(__cplusplus) || defined(c_plusplus)
31}    // extern "C"
32#endif
33
34#endif // WEBRTC_SYSTEM_WRAPPERS_INTERFACE_CPU_FEATURES_WRAPPER_H_
35