AscendIndexGreat

API definition

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

Function

Constructor of AscendIndexGreat, which creates a retrieval index on Ascend.

Input

const std::string& mode: algorithm mode.

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

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

Output

N/A

Return value

N/A

Restrictions

  • mode: Only KMode and AKMode are supported.
  • deviceList: Run the npu-smi command to query the corresponding NPU ID. Only one device ID 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

explicit AscendIndexGreat(const AscendIndexGreatInitParams& kModeInitParams);

Function

Constructor of AscendIndexGreat, which creates a retrieval index on Ascend.

Input

Initialization parameter kModeInitParams required by the index. For details, see AscendIndexGreatInitParams.

Output

N/A

Return value

APP_ERROR: return status. For details, see Return Code Reference.

Restrictions

For details, see AscendIndexGreatInitParams.

API definition

AscendIndexGreat(const AscendIndexVstarInitParams& aModeInitParams, const AscendIndexGreatInitParams& kModeInitParams);

Function

Constructor of AscendIndexGreat, which creates a retrieval index on Ascend.

Input

Initialization parameters aModeInitParams and kModeInitParams required by the index. For details, see AscendIndexVstarInitParams and AscendIndexGreatInitParams.

Output

N/A

Return value

APP_ERROR: return status. For details, see Return Code Reference.

Restrictions

For details, see AscendIndexVstarInitParams and AscendIndexGreatInitParams.

dim of aModeInitParams and kModeInitParams must be consistent.

API definition

AscendIndexGreat(const AscendIndexGreat&) = delete;

Function

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

Input

const AscendIndexGreat&: constant AscendIndexGreat object.

Output

N/A

Return value

N/A

Restrictions

N/A