faiss
faiss copied to clipboard
Parallelize compute_residuals in IndexIVFPQ
Add OpenMP parallelization to compute_residuals function. This addresses the TODO comment about parallelization.
Changes:
- Add #pragma omp parallel for to residual computation loop
- Use if(n > 1000) to avoid overhead for small batches
- Each iteration is independent and thread-safe