aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorMisty De Meo2013-04-07 12:47:40 -0500
committerMisty De Meo2013-04-07 12:47:56 -0500
commit0501ecc41378a63a7a5aea51875caebf774e72c0 (patch)
treec5f94c3004ef42e49c0c6793a823b0ccc6e0fe85 /Library
parentfbf7be913a7693c05a4fa40050b7819781b26df0 (diff)
downloadhomebrew-0501ecc41378a63a7a5aea51875caebf774e72c0.tar.bz2
MacCPUs: add .avx? helper
Diffstat (limited to 'Library')
-rw-r--r--Library/Homebrew/os/mac/hardware.rb5
1 files changed, 5 insertions, 0 deletions
diff --git a/Library/Homebrew/os/mac/hardware.rb b/Library/Homebrew/os/mac/hardware.rb
index e70ce7b8a..c5e803261 100644
--- a/Library/Homebrew/os/mac/hardware.rb
+++ b/Library/Homebrew/os/mac/hardware.rb
@@ -77,6 +77,11 @@ module MacCPUs
type == :ppc && family != :g3
end
+ def avx?
+ pre_sandy = [:core, :core2, :penryn, :nehalem, :arrandale].include? family
+ type == :intel && !pre_sandy
+ end
+
def sse3?
type == :intel
end