Skip to content

Fix size calculation for FAISS Indexes#62

Open
CascadingRadium wants to merge 1 commit intomasterfrom
fixSize
Open

Fix size calculation for FAISS Indexes#62
CascadingRadium wants to merge 1 commit intomasterfrom
fixSize

Conversation

@CascadingRadium
Copy link
Copy Markdown
Member

  • Use the new FAISS API signature

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates the Go FAISS bindings to use the newer FAISS C API signatures for retrieving index size, so Size() continues to work with updated FAISS versions.

Changes:

  • Switch faiss_Index_size binding usage to the new (index, *size_t) -> int form and handle the return code.
  • Switch faiss_IndexBinary_size binding usage to the new (index, *size_t) -> int form and handle the return code.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
index.go Updates Index.Size() to call the new faiss_Index_size signature using an out-parameter.
index_binary.go Updates BinaryIndex.Size() to call the new faiss_IndexBinary_size signature using an out-parameter.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread index.go
Comment thread index_binary.go
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants