Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit d318c73

Browse files
Michelle Mafacebook-github-bot
Michelle Ma
authored andcommittedJan 6, 2025·
Expose accumulate_to_mem from faiss interface
Summary: Expose interface of accumulate_to_mem. accumulate_to_mem calls pq4 fast scan accumulate with a dummy scaler and a StoreResultHandler. The function is not currently in use anywhere. We plan to use it in unicorn integration of PQ4 fast scan. Reviewed By: asadoughi Differential Revision: D67299378
1 parent 9590ad2 commit d318c73

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed
 

‎faiss/impl/pq4_fast_scan.h

+18
Original file line numberDiff line numberDiff line change
@@ -189,4 +189,22 @@ void pq4_accumulate_loop_qbs(
189189
SIMDResultHandler& res,
190190
const NormTableScaler* scaler = nullptr);
191191

192+
/** Wrapper of pq4_accumulate_loop_qbs using simple StoreResultHandler
193+
* and DummyScaler
194+
*
195+
* @param nq number of queries
196+
* @param ntotal2 number of database elements (multiple of 32)
197+
* @param nsq number of sub-quantizers (muliple of 2)
198+
* @param codes packed codes array
199+
* @param LUT packed look-up table
200+
* @param accu array to store the results
201+
*/
202+
void accumulate_to_mem(
203+
int nq,
204+
size_t ntotal2,
205+
int nsq,
206+
const uint8_t* codes,
207+
const uint8_t* LUT,
208+
uint16_t* accu);
209+
192210
} // namespace faiss

0 commit comments

Comments
 (0)
Please sign in to comment.