Function: create_query_table

Applicability

Product

Supported (√/x)

Atlas A3 training products / Atlas A3 inference products

x

Atlas A2 training products / Atlas A2 inference products

x

Atlas training products

x

Atlas inference products

Atlas 200I/500 A2 inference products

x

Function Usage

Creates data of the aclfvQueryTable type as a search input table.

To destroy data of the aclfvQueryTable type, call Function: destroy_query_table.

The Atlas inference accelerator modules in the Atlas inference products does not support this API.

Prototype

  • C Prototype
    1
    aclfvQueryTable *aclfvCreateQueryTable(uint32_t queryCnt, uint32_t tableLen, uint8_t *tableData, uint32_t tableDataLen)
    
  • Python Function
    1
    query_table = acl.fv.create_query_table(query_cnt, table_len, table_data, table_data_len)
    

Parameter Description

Parameter

Description

query_cnt

Int, number of search requests, fixed at 1 in 1:N mode or up to 1024 in the N:M scenario.

table_len

Int, table length, fixed at 32 KB. The system verifies the length internally.

table_data

Int, feature value table, stored consecutively based on the feature length.

table_data_len

Int, length of the memory allocated to tableData, which is used for verification.

Return Value Description

Return Value

Description

query_table

Int, pointer address.

  • Success: data of the aclfvQueryTable type
  • If 0 is returned, the operation fails.

Reference

For details about the API call sequence and sample code, see Feature Vector Search.