223 /*xids:外部指定的每个向量的唯一标识*/
224 void IndexIVFPQ::add_core_o (idx_t n, const float * x, const idx_t *xids,
225 float *residuals_2, const idx_t *precomputed_idx)
226 {
227
228 idx_t bs = 32768;
229 if (n > bs) {
230 for (idx_t i0 = 0; i0 < n; i0 += bs) {
231 idx_t i1 = std::min(i0 + bs, n);
232 if (verbose) {
233 printf("IndexIVFPQ::add_core_o: adding %ld:%ld / %ld\n",
234 i0, i1, n);
235 }
236 add_core_o (i1 - i0, x + i0 * d,
237 xids ? xids + i0 : nullptr,
238 residuals_2 ? residuals_2 + i0 * d : nullptr,
239