Function: create_feature_info

Description

Creates data of the aclfvFeatureInfo type for feature description.

To destroy data of the aclfvFeatureInfo type, call Function: destroy_feature_info.

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

Prototype

  • C Prototype
    1
    aclfvFeatureInfo *aclfvCreateFeatureInfo(uint32_t id0, uint32_t id1, uint32_t offset, uint32_t featureLen,uint32_t featureCount, uint8_t *featureData, uint32_t featureDataLen)
    
  • Python Function
    1
    feature_info = acl.fv.create_feature_info(id0, id1, offset, feature_len, feature_count, feature_data, feature_len)
    

Parameters

Parameter

Description

id0

Int, repository 0 ID. Must be within [0, 1023]. Defaults to 0 in N:M mode. id0 and id1 together identify a repository.

id1

Int, repository 1 ID. Must be within [0, 1023]. Defaults to 0 in N:M mode. id0 and id1 together identify a repository.

offset

Int, offset of the first feature to be added in the repository. The offset value must be the same as the number of features added to the repository. Defaults to 0 in N:M mode.

feature_len

Int, feature length, fixed at 36 bytes. The system verifies the length internally.

feature_count

Int, number of features, up to 1 million in 1:N mode or up to 10 million in N:M mode.

feature_data

Int, feature values, which are stored contiguously based on the feature length. The first 4 bytes of each feature are 0.

feature_len

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

Return Value

Return Value

Description

feature_info

Int, pointer address.

  • Success: data of the aclfvFeatureInfo type.
  • Failure: 0.

Reference

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