krl_negative_ipdis_f16f32
Interface Definition
float krl_negative_ipdis_f16f32(const uint16_t* x, const uint16_t* __restrict y, const size_t d, float* dis, size_t dis_size);
Function
Performs one-to-one distance computation using inner product on vectors represented in fp16 precision.
Parameters
Parameter |
Data Type |
Description |
Value Range |
|---|---|---|---|
x |
const uint16_t* |
Query vector for distance computation. |
The vector has a dimension of d. |
y |
const uint16_t* |
Base vector for distance computation. |
The vector has a dimension of d. |
d |
size_t |
Vector dimension. |
[1, 65535] |
dis |
float* |
Stores the distance computation result. |
The size is specified by dis_size. The memory needs to be allocated in advance. |
dis_size |
size_t |
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: |