InitWithExtraVal
| API定义 | APP_ERROR InitWithExtraVal(uint32_t deviceId, uint32_t dim, uint32_t tokenNum, uint64_t resources, AlgorithmType algType = AlgorithmType::FLAT_HAMMING, MemoryStrategy memoryStrategy = MemoryStrategy::PURE_DEVICE_MEMORY, uint32_t customAttrLen = 0, uint32_t customAttrBlockSize = 0, uint64_t maxFeatureRowCount = std::numeric_limits<uint64_t>::max()); | 
|---|---|
| 功能描述 | 实例带附加属性的初始化函数。 | 
| 输入 | uint32_t deviceId:Index使用的设备ID。 uint32_t dim:底库向量的维度。 uint32_t tokenNum:当前时空库Token的最大数量,需要和生成对应的Mask生成算子Token数量一致。 uint64_t resources:共享内存大小。 AlgorithmType algtype:底层使用的距离比对算法,默认为“AlgorithmType::FLAT_HAMMING”。 MemoryStrategy memoryStrategy:底层使用的内存策略,默认为“MemoryStrategy::PURE_DEVICE_MEMORY”。 customAttrLen:自定义属性长度。 customAttrBlockSize:自定义属性blocksize的大小。 maxFeatureRowCount:底库最大向量条数。 | 
| 输出 | 无 | 
| 返回值 | APP_ERROR:调用返回状态,具体请参见接口调用返回值参考。 | 
| 约束说明 | 
 |