From 3882603ba855f28eae698c2c24039b5e86ee5c95 Mon Sep 17 00:00:00 2001 From: Misty De Meo Date: Sun, 7 Apr 2013 12:47:40 -0500 Subject: [PATCH] MacCPUs: add .avx? helper --- Library/Homebrew/os/mac/hardware.rb | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Library/Homebrew/os/mac/hardware.rb b/Library/Homebrew/os/mac/hardware.rb index e70ce7b8a5..c5e8032614 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