AscendIndexFlatConfig
AscendIndexFlat requires the corresponding AscendIndexFlatConfig to initialize related resources.
API Description
API definition |
inline AscendIndexFlatConfig() |
|---|---|
Function |
Default constructor of AscendIndexFlatConfig. |
Input |
N/A |
Output |
N/A |
Return value |
N/A |
Restrictions |
N/A |
API definition |
inline AscendIndexFlatConfig(std::initializer_list<int> devices, int64_t resourceSize = FLAT_DEFAULT_MEM) |
|---|---|
Function |
Constructor of AscendIndexFlatConfig, which is used to generate AscendIndexFlatConfig. The Ascend AI Processor resources on the device and the resource pool size are configured 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 FLAT_DEFAULT_MEM in the header file. This parameter is determined by the database capacity and search batch size. If the database has 4,194,304 records or more and the batch size is greater than or equal to 16, set this parameter as follows.
|
Output |
N/A |
Return value |
N/A |
Restrictions |
|
API definition |
inline AscendIndexFlatConfig(std::vector<int> devices, int64_t resourceSize = FLAT_DEFAULT_MEM) |
|---|---|
Function |
Constructor of AscendIndexFlatConfig, which is used to generate AscendIndexFlatConfig. The Ascend AI Processor resources on the device and the resource pool size are configured 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 FLAT_DEFAULT_MEM in the header file. This parameter is determined by the database capacity and search batch size. If the database has 4,194,304 records or more and the batch size is greater than or equal to 16, set this parameter as follows.
|
Output |
N/A |
Return value |
N/A |
Restrictions |
|