aclfvCreateFeatureInfo

Applicable Products

Product

Supported

Ascend 950PR/Ascend 950DT

X

Atlas A3 training products/Atlas A3 inference products

X

Atlas A2 training products/Atlas A2 inference products

X

Atlas 200I/500 A2 inference products

X

Atlas inference products

√

Atlas training products

X

Function

Creates data of the aclfvFeatureInfo type for feature description. To destroy data of the aclfvFeatureInfo type, call aclfvDestroyFeatureInfo.

Atlas inference accelerator module: This API is not supported.

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)

Parameters

Parameter

Input/Output

Description

id0

Input

Repository 0 ID. Must be within [0, 1023]. Defaults to 0 in N:M mode.

id0 and id1 together identify a repository.

id1

Input

Repository 1 ID. Must be within [0, 1023]. Defaults to 0 in N:M mode.

id0 and id1 together identify a repository.

offset

Input

Offset of the first feature in the library. The offset value must be consistent with the number of features that have been added to the library. In N:M mode, the default value is 0.

featureLen

Input

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

featureCount

Input

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

featureData

Input

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

featureDataLen

Input

Length of the memory allocated for the featureData pointer, used for verification.

Returns

  • Success: a pointer to data of the aclfvFeatureInfo type
  • Failure: nullptr