dlib: use SSE2, SSE4, and AVX when possible
Closes #28347. Signed-off-by: FX Coudert <fxcoudert@gmail.com>
This commit is contained in:
parent
9773f9c300
commit
ca80c2b1ce
1 changed files with 6 additions and 0 deletions
|
@ -27,6 +27,12 @@ class Dlib < Formula
|
|||
|
||||
args = std_cmake_args + %w[-DDLIB_USE_BLAS=ON -DDLIB_USE_LAPACK=ON]
|
||||
args << "-DDLIB_NO_GUI_SUPPORT=ON" if build.without? "x11"
|
||||
args << "-DUSE_SSE2_INSTRUCTIONS=ON" # SSE2 is present on all modern macOS hardware
|
||||
|
||||
unless build.bottle?
|
||||
args << "-DUSE_AVX_INSTRUCTIONS=ON" if Hardware::CPU.avx?
|
||||
args << "-DUSE_SSE4_INSTRUCTIONS=ON" if Hardware::CPU.sse4?
|
||||
end
|
||||
|
||||
if build.with? "openblas"
|
||||
args << "-Dcblas_lib=#{Formula["openblas"].opt_lib}/libopenblas.dylib"
|
||||
|
|
Loading…
Reference in a new issue