diff --git a/internal/core/src/indexbuilder/index_c.cpp b/internal/core/src/indexbuilder/index_c.cpp index 92137dad6d..5566e15471 100644 --- a/internal/core/src/indexbuilder/index_c.cpp +++ b/internal/core/src/indexbuilder/index_c.cpp @@ -255,7 +255,7 @@ GetIdsOfQueryResult(CIndexQueryResult res, int64_t* ids) { auto c_res = (milvus::indexbuilder::IndexWrapper::QueryResult*)res; auto nq = c_res->nq; auto k = c_res->topk; - // TODO: how could we avoid memory copy every time when this called + // TODO: how could we avoid memory copy whenever this called memcpy(ids, c_res->ids.data(), sizeof(int64_t) * nq * k); } @@ -264,7 +264,7 @@ GetDistancesOfQueryResult(CIndexQueryResult res, float* distances) { auto c_res = (milvus::indexbuilder::IndexWrapper::QueryResult*)res; auto nq = c_res->nq; auto k = c_res->topk; - // TODO: how could we avoid memory copy every time when this called + // TODO: how could we avoid memory copy whenever this called memcpy(distances, c_res->distances.data(), sizeof(float) * nq * k); }