Init
API definition |
APP_ERROR Init(uint32_t deviceId, uint32_t dim, uint32_t tokenNum, AlgorithmType algType = AlgorithmType::FLAT_COS_INT8, MemoryStrategy memoryStrategy = MemoryStrategy::PURE_DEVICE_MEMORY, uint32_t customAttrLen = 0, uint32_t customAttrBlockSize = 0, uint64_t maxFeatureRowCount = std::numeric_limits<uint64_t>::max()); |
|---|---|
Function |
Initializes an instance. |
Input |
uint32_t deviceId: device ID used by the Index. uint32_t dim: vector dimension. uint32_t tokenNum: maximum number of tokens in the spatiotemporal database. The value must be the same as the number of tokens of the corresponding mask operator. AlgorithmType algType: distance comparison algorithm used at the bottom layer. The default value is AlgorithmType::FLAT_COS_INT8. The options are as follows:
MemoryStrategy memoryStrategy: memory policy used at the bottom layer. The default value is MemoryStrategy::PURE_DEVICE_MEMORY. The options are as follows:
customAttrLen: length of a custom attribute customAttrBlockSize: block size of a custom attribute maxFeatureRowCount: maximum number of vectors |
Output |
N/A |
Return value |
APP_ERROR: return status. For details, see Return Code Reference. |
Restrictions |
|