Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

faiss 1.6.1 (new formula) #49235

Closed
wants to merge 2 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
29 changes: 29 additions & 0 deletions Formula/faiss.rb
@@ -0,0 +1,29 @@
class Faiss < Formula
desc "Efficient similarity search and clustering of dense vectors"
homepage "https://github.com/facebookresearch/faiss"
url "https://github.com/facebookresearch/faiss/archive/v1.6.1.tar.gz"
sha256 "827437c9a684fcb88ee21a8fd8f0ecd94f36e2db213f74357d0465c5a7e72ac6"

depends_on "libomp"

def install
system "./configure", "--without-cuda",
"--prefix=#{prefix}"
system "make"
system "make", "install"
end

test do
(testpath/"test.cpp").write <<~EOS
#include <faiss/IndexFlat.h>

int main()
{
faiss::IndexFlatL2 index(64);
return 0;
}
EOS
system ENV.cxx, "-std=c++11", "-L#{lib}", "-lfaiss", "test.cpp", "-o", "test"
system "./test"
end
end