Function: create_search_input

Applicable Products

Product

Supported (√/x)

Ascend 950PR&950DT products

x

Atlas A3 products

x

Atlas A2 products

x

Atlas training products

x

Atlas inference products

√

Atlas 200I/500 A2 inference products

x

Description

Creates data of the aclfvSearchInput type as an input of a search task.

To destroy data of the aclfvSearchInput type, call Function: destroy_search_input.

This API is not supported for Atlas inference accelerator modules in Atlas inference products.

Prototype

  • C Prototype
    1
    aclfvSearchInput *aclfvCreateSearchInput(aclfvQueryTable *queryTable, aclfvRepoRange *repoRange, uint32_t topK)
    
  • Python Function
    1
    search_input = acl.fv.create_search_input(query_table, repo_range, topK)
    

Parameters

Parameter

Description

query_table

  • Int, address of the pointer that points to the input table information for query.

    Call acl.fv.create_query_table to create data of the aclfvQueryTable type.

repo_range

  • Int, address of the pointer that points to the feature library range for query.

    Call acl.fv.create_repo_range to create data of the aclfvRepoRange type.

topK

Int, number of results to return per search request.

Return Values

Return Value

Description

search_input

Int, pointer address.

  • Data of the aclfvSearchInput type: success
  • 0: failure

Reference

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