krl_L2sqr_ny_u8f32
Interface Definition
void krl_L2sqr_ny_u8f32(float* dis, const uint8_t* x, const uint8_t* y, size_t ny, size_t d, size_t dis_size);
Function
Performs one-to-many Euclidean distance computation on vectors represented as 8-bit unsigned integers (uint8).
Parameters
Parameter |
Data Type |
Description |
Value Range |
|---|---|---|---|
dis |
float* |
Stores the distance computation result. |
The size is specified by dis_size. The memory needs to be allocated in advance. |
x |
const uint8_t* |
Query vector for distance computation. |
The vector has a dimension of d. |
y |
const uint8_t* |
Base vector for distance computation. |
The size is specified by d × ny. |
ny |
size_t |
The number of base vectors. |
[1, 2^30 – 1] |
d |
size_t |
Vector dimension. |
[1, 65535] |
dis_size |
size_t |
Size of the distance result array. |
The value is specified by ny. |
Return Values
Data Type |
Description |
|---|---|
int |
0 is returned on successful execution. In case of failure, an error code is returned to indicate the specific issue: |