aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/os
diff options
context:
space:
mode:
authorMisty De Meo2013-04-07 12:47:40 -0500
committerMisty De Meo2013-04-07 12:47:56 -0500
commit3882603ba855f28eae698c2c24039b5e86ee5c95 (patch)
treea1c658adb3f041068768181074ce75ada6ffb286 /Library/Homebrew/os
parent8bd619e03b17f603027b0724e3d018dd241b6d23 (diff)
downloadbrew-3882603ba855f28eae698c2c24039b5e86ee5c95.tar.bz2
MacCPUs: add .avx? helper
Diffstat (limited to 'Library/Homebrew/os')
-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