我要评分
获取效率
正确性
完整性
易理解

krl_create_LUT8b_handle

Interface Definition

int krl_create_LUT8b_handle(KRLLUT8bHandle** klh, int use_idx, size_t capacity);

Function

Initializes and constructs a KRLLUT8bHandle instance for accumulation based on the 8-bit LUP.

Parameters

Parameter

Data Type

Description

Value Range

klh

KRLLUT8bHandle**

Pointer to the KRLLUT8bHandle instance to be initialized.

It cannot be null and should point to a null pointer.

use_idx

int

Indicates whether to filter base vectors.

[0, 1]

  • 0: filtering disabled
  • 1: filtering enabled

capacity

size_t

Handle class capacity, which is the maximum possible size of distance vectors and filtering vectors.

≥ 1 and ≥ ncode when krl_table_lookup_8b_f32_with_handle is called. ncode indicates the total number of base vectors.

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:

  • -1: invalid pointer
  • -2: memory allocation failure
  • -3: invalid input parameter
  • -4: double free
  • -5: insecure memory operation
  • -6: I/O failure