AscendIndexIVFSQTConfig
AscendIndexIVFSQT requires the corresponding AscendIndexIVFSQTConfig to initialize related resources.
AscendIndexIVFSQTConfig
API definition |
inline AscendIndexIVFSQTConfig(); |
|---|---|
Function |
Default constructor. The default value of devices is 0, indicating the 0th Ascend AI Processor is used for computing. The default value of resource is 384 MB. |
Input |
N/A |
Output |
N/A |
Return value |
N/A |
Restrictions |
N/A |
API definition |
inline AscendIndexIVFSQTConfig(std::initializer_list<int> devices, int64_t resourceSize = IVFSQT_DEFAULT_TEMP_MEM); |
|---|---|
Function |
Constructor of AscendIndexIVFSQTConfig, which is used to generate AscendIndexIVFSQTConfig and perform default initialization. The Ascend AI Processor resources on the device and resource pool size are set based on the value configured in devices. |
Input |
std::initializer_list<int> devices: device ID int64_t resourceSize: preset memory pool size on the device, in bytes. It is the memory space for storing intermediate results during computing to prevent performance fluctuation caused by dynamic memory allocation. The default parameter is IVFSQT_DEFAULT_TEMP_MEM in the header file. This parameter is determined by the database capacity and search batch size. If the database has 10 million records and batch size is greater than or equal to 16, set this parameter to 1024 MB. |
Output |
N/A |
Return value |
N/A |
Restrictions |
|
API definition |
inline AscendIndexIVFSQTConfig(std::vector<int> devices, int64_t resourceSize = IVFSQT_DEFAULT_TEMP_MEM); |
|---|---|
Function |
Constructor of AscendIndexIVFSQTConfig, which is used to generate AscendIndexIVFSQTConfig and perform default initialization. The Ascend AI Processor resources on the device and resource pool size are set based on the value configured in devices. |
Input |
std::vector<int> devices: device ID int64_t resourceSize: preset memory pool size on the device, in bytes. It is the memory space for storing intermediate results during computing to prevent performance fluctuation caused by dynamic memory allocation. The default parameter is IVFSQT_DEFAULT_TEMP_MEM in the header file. This parameter is determined by the database capacity and search batch size. If the database has 10 million records and batch size is greater than or equal to 16, set this parameter to 1024 MB. |
Output |
N/A |
Return value |
N/A |
Restrictions |
|
SetDefaultIVFSQConfig
API definition |
inline void SetDefaultIVFSQConfig(); |
|---|---|
Function |
Performs the default initialization, sets the number of iterations to 16, and sets a maximum of 512 points for each centroid. |
Input |
N/A |
Output |
N/A |
Return value |
N/A |
Restrictions |
N/A |
