krl_L2sqr_u8u32
Interface Definition
int krl_L2sqr_u8u32(const uint8_t* x, const uint8_t* __restrict y, size_t d, uint32_t* dis, size_t dis_size);
Function
Performs one-to-one Euclidean distance computation on vectors represented as 8-bit unsigned integers (uint8).
Parameters
Parameter |
Data Type |
Description |
Value Range |
|---|---|---|---|
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 vector has a dimension of d. |
d |
size_t |
Vector dimension. |
[1, 65535] |
dis |
uint32_t* |
Stores the distance computation result. |
The size is specified by dis_size. The memory needs to be allocated in advance. |
dis_size |
size_t |
Specifies the size of the distance result array. |
The value is 1. |
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:
|