Index: base/cpu.h |
diff --git a/base/cpu.h b/base/cpu.h |
index 957b1a564c9a6b23a03f9a56d1972d586240e4df..65fda47950c9dae97dcd9a288d3d65c2affac79b 100644 |
--- a/base/cpu.h |
+++ b/base/cpu.h |
@@ -17,6 +17,18 @@ class BASE_EXPORT CPU { |
// Constructor |
CPU(); |
+ enum IntelMicroArchitecture { |
+ PENTIUM, |
+ SSE, |
+ SSE2, |
+ SSE3, |
+ SSSE3, |
+ SSE41, |
+ SSE42, |
+ AVX, |
+ MAX_INTEL_MICRO_ARCHITECTURE |
+ }; |
+ |
// Accessors for CPU information. |
const std::string& vendor_name() const { return cpu_vendor_; } |
int stepping() const { return stepping_; } |
@@ -32,6 +44,8 @@ class BASE_EXPORT CPU { |
bool has_ssse3() const { return has_ssse3_; } |
bool has_sse41() const { return has_sse41_; } |
bool has_sse42() const { return has_sse42_; } |
+ bool has_avx() const { return has_avx_; } |
+ IntelMicroArchitecture GetIntelMicroArchitecture() const; |
const std::string& cpu_brand() const { return cpu_brand_; } |
private: |
@@ -51,6 +65,7 @@ class BASE_EXPORT CPU { |
bool has_ssse3_; |
bool has_sse41_; |
bool has_sse42_; |
+ bool has_avx_; |
std::string cpu_vendor_; |
std::string cpu_brand_; |
}; |