Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3334)

Unified Diff: base/cpu.h

Issue 1380943002: Add AVX2 detection (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix typo in xgetbv Created 5 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | base/cpu.cc » ('j') | base/cpu_unittest.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/cpu.h
diff --git a/base/cpu.h b/base/cpu.h
index 0c809f00c8b98023a339242200114c9b2c28efd2..b39607827069539c3666bd456331eb89c3e01d8c 100644
--- a/base/cpu.h
+++ b/base/cpu.h
@@ -26,6 +26,7 @@ class BASE_EXPORT CPU {
SSE41,
SSE42,
AVX,
+ AVX2,
MAX_INTEL_MICRO_ARCHITECTURE
};
@@ -46,6 +47,7 @@ class BASE_EXPORT CPU {
bool has_sse41() const { return has_sse41_; }
bool has_sse42() const { return has_sse42_; }
bool has_avx() const { return has_avx_; }
+ bool has_avx2() const { return has_avx2_; }
// has_avx_hardware returns true when AVX is present in the CPU. This might
// differ from the value of |has_avx()| because |has_avx()| also tests for
// operating system support needed to actually call AVX instuctions.
@@ -84,6 +86,7 @@ class BASE_EXPORT CPU {
bool has_sse42_;
bool has_avx_;
bool has_avx_hardware_;
+ bool has_avx2_;
bool has_aesni_;
bool has_non_stop_time_stamp_counter_;
bool has_broken_neon_;
« no previous file with comments | « no previous file | base/cpu.cc » ('j') | base/cpu_unittest.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698