2012-06-21 22:50:05 +08:00
|
|
|
#ifndef __HARDWARE_DETECTOR_H__
|
|
|
|
#define __HARDWARE_DETECTOR_H__
|
|
|
|
|
|
|
|
#include <string>
|
|
|
|
|
|
|
|
#define ARCH_UNKNOWN 0L
|
|
|
|
#define ARCH_X86 16777216L
|
|
|
|
#define ARCH_X64 33554432L
|
|
|
|
#define ARCH_ARMv5 67108864L
|
|
|
|
#define ARCH_ARMv6 134217728L
|
|
|
|
#define ARCH_ARMv7 268435456L
|
|
|
|
#define ARCH_ARMv8 536870912L
|
2012-10-02 19:02:04 +08:00
|
|
|
#define ARCH_MIPS 1073741824L
|
2012-06-21 22:50:05 +08:00
|
|
|
|
|
|
|
#define FEATURES_HAS_VFPv3d16 1L
|
|
|
|
#define FEATURES_HAS_VFPv3 2L
|
|
|
|
#define FEATURES_HAS_NEON 4L
|
|
|
|
#define FEATURES_HAS_NEON2 8L
|
|
|
|
#define FEATURES_HAS_SSE 1L
|
|
|
|
#define FEATURES_HAS_SSE2 2L
|
|
|
|
#define FEATURES_HAS_SSSE3 4L
|
|
|
|
#define FEATURES_HAS_GPU 65536L
|
|
|
|
|
2012-09-14 21:20:59 +08:00
|
|
|
// TODO: Do not forget to add Platrfom name to PackageInfo::PlatformNameMap
|
2012-06-21 22:50:05 +08:00
|
|
|
// in method PackageInfo::InitPlatformNameMap()
|
|
|
|
#define PLATFORM_UNKNOWN 0L
|
|
|
|
#define PLATFORM_TEGRA 1L
|
|
|
|
#define PLATFORM_TEGRA2 2L
|
|
|
|
#define PLATFORM_TEGRA3 3L
|
2013-03-18 16:12:17 +08:00
|
|
|
#define PLATFORM_TEGRA4 4L
|
2012-06-21 22:50:05 +08:00
|
|
|
|
|
|
|
int DetectKnownPlatforms();
|
|
|
|
int GetProcessorCount();
|
|
|
|
std::string GetPlatformName();
|
|
|
|
int GetCpuID();
|
|
|
|
|
|
|
|
#endif
|