facebookresearch / faiss

A library for efficient similarity search and clustering of dense vectors.
https://faiss.ai
MIT License
31.57k stars 3.65k forks source link

Use count_if to compute nminus1. #3990

Closed ttsugriy closed 3 weeks ago

ttsugriy commented 4 weeks ago

Summary: it's more concise, idiomatic and less error prone. This also makes it very easy to experiment with ExecutionPolicy param to control whether this check should be vectorized/parallelized

Differential Revision: D64978862

facebook-github-bot commented 4 weeks ago

This pull request was exported from Phabricator. Differential Revision: D64978862