GetPQDistanceTable
API definition |
int GetPQDistanceTable(char *vec, const DiskPQParams *params, float *pqDistanceTable); |
|---|---|
Function |
Uses params populated with PQ data to calculate the ADC PQ distance of the query data to which vec points, and writes the PQ distance table to the buffer to which pqDistanceTable points. |
Input |
char *vec: pointer to the query data to be calculated. const DiskPQParams *params: pointer to a DiskPQParams instance populated with PQ parameters and trained PQ data. It cannot be a null pointer. |
Output |
float *pqDistanceTable: pointer to the returned distance between the query and each centroid in each chunk. |
Return value |
int: The return value 0 indicates a normal process; and -1 indicates an abnormal process, with error details output to cerr. |
Restrictions |
|