AscendIndexVStar

  • For params passed during index instance creation, set params.dim based on the actual situation.
  • The values of params.subSpaceDim and params.nlist must be the same as those during codebook training.

API definition

explicit AscendIndexVStar(const AscendIndexVstarInitParams& params);

Function

Constructor of AscendIndexVStar, which constructs the index of the corresponding dimension based on the value configured in params.

Input

const AscendIndexVstarInitParams& params: configuration parameters for construction. For details, see AscendIndexVstarInitParams.

Output

N/A

Return value

N/A

Restrictions

For details, see AscendIndexVstarInitParams.

API definition

AscendIndexVStar(const std::vector<int>& deviceList, bool verbose = false);

Function

Constructor of AscendIndexVStar, which constructs the index of an unknown input data dimension and hyperparameter based on deviceList.

Input

const std::vector<int>& deviceList: device ID.

bool verbose: whether to enable verbose. If it is enabled, additional information will be displayed for some operations. The default value is false.

Output

N/A

Return value

N/A

Restrictions

  • The value of deviceList must be a valid device ID. Currently, only one device is supported.
  • After creating an index instance using this constructor, you need to call LoadIndex to load the index instance that has been flushed to a drive before performing other operations.

API definition

AscendIndexVStar(const AscendIndexVStar&) = delete;

Function

Declares that the copy constructor of this Index class is void, that is, it cannot be copied.

Input

const AscendIndexVStar&: AscendIndexVStar object.

Output

N/A

Return value

N/A

Restrictions

N/A