Function: set_1n_top_num

Description

Sets the maximum number of results (topK) returned in the 1:N search mode. If it is not set, top 4800 results are returned by default.

The Atlas inference accelerator module of the Atlas inference product does not support this API.

Prototype

  • C Prototype
    1
    aclError aclfvSet1NTopNum(aclfvInitPara *initPara, uint32_t maxTopNumFor1N)
    
  • Python Function
    1
    ret = acl.fv.set_1n_top_num(init_para, max_top_num_for_1n)
    

Parameters

Parameter

Description

init_para

  • Int, initialization configuration for feature vector search.

    Call the acl.fv.create_init_para API to create data of the aclfvInitPara type in advance.

max_top_num_for_1n

Int, maximum number of results (topK) returned in 1:N mode. Must be in the range of [2, 4800].

Return Value

Return Value

Description

ret

Int, error code.

Reference

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