提交 afbe9152 编写于 作者: Y yudong.cai

#275 rename c++ sdk IndexType

上级 7edf3e8a
...@@ -13,6 +13,7 @@ Please mark all change in change log and use the ticket from JIRA. ...@@ -13,6 +13,7 @@ Please mark all change in change log and use the ticket from JIRA.
- \#226 - Experimental shards middleware for Milvus - \#226 - Experimental shards middleware for Milvus
## Improvement ## Improvement
- \#275 - Rename C++ SDK IndexType
- \#284 - Change C++ SDK to shared library - \#284 - Change C++ SDK to shared library
- \#260 - C++ SDK README - \#260 - C++ SDK README
......
...@@ -41,7 +41,7 @@ constexpr int64_t NQ = 5; ...@@ -41,7 +41,7 @@ constexpr int64_t NQ = 5;
constexpr int64_t TOP_K = 10; constexpr int64_t TOP_K = 10;
constexpr int64_t NPROBE = 32; constexpr int64_t NPROBE = 32;
constexpr int64_t SEARCH_TARGET = 5000; // change this value, result is different constexpr int64_t SEARCH_TARGET = 5000; // change this value, result is different
constexpr milvus::IndexType INDEX_TYPE = milvus::IndexType::gpu_ivfsq8; constexpr milvus::IndexType INDEX_TYPE = milvus::IndexType::IVFSQ8;
constexpr int32_t N_LIST = 15000; constexpr int32_t N_LIST = 15000;
constexpr int32_t PARTITION_COUNT = 5; constexpr int32_t PARTITION_COUNT = 5;
constexpr int32_t TARGET_PARTITION = 3; constexpr int32_t TARGET_PARTITION = 3;
......
...@@ -41,7 +41,7 @@ constexpr int64_t TOP_K = 10; ...@@ -41,7 +41,7 @@ constexpr int64_t TOP_K = 10;
constexpr int64_t NPROBE = 32; constexpr int64_t NPROBE = 32;
constexpr int64_t SEARCH_TARGET = 5000; // change this value, result is different constexpr int64_t SEARCH_TARGET = 5000; // change this value, result is different
constexpr int64_t ADD_VECTOR_LOOP = 5; constexpr int64_t ADD_VECTOR_LOOP = 5;
constexpr milvus::IndexType INDEX_TYPE = milvus::IndexType::gpu_ivfsq8; constexpr milvus::IndexType INDEX_TYPE = milvus::IndexType::IVFSQ8;
constexpr int32_t N_LIST = 15000; constexpr int32_t N_LIST = 15000;
milvus::TableSchema milvus::TableSchema
......
...@@ -89,14 +89,16 @@ Utils::MetricTypeName(const milvus::MetricType& metric_type) { ...@@ -89,14 +89,16 @@ Utils::MetricTypeName(const milvus::MetricType& metric_type) {
std::string std::string
Utils::IndexTypeName(const milvus::IndexType& index_type) { Utils::IndexTypeName(const milvus::IndexType& index_type) {
switch (index_type) { switch (index_type) {
case milvus::IndexType::cpu_idmap: case milvus::IndexType::FLAT:
return "cpu idmap"; return "FLAT";
case milvus::IndexType::gpu_ivfflat: case milvus::IndexType::IVFFLAT:
return "gpu ivflat"; return "IVFFLAT";
case milvus::IndexType::gpu_ivfsq8: case milvus::IndexType::IVFSQ8:
return "gpu ivfsq8"; return "IVFSQ8";
case milvus::IndexType::mix_nsg: case milvus::IndexType::NSG:
return "mix nsg"; return "NSG";
case milvus::IndexType::IVFSQ8H:
return "IVFSQ8H";
default: default:
return "Unknown index type"; return "Unknown index type";
} }
......
...@@ -31,12 +31,12 @@ namespace milvus { ...@@ -31,12 +31,12 @@ namespace milvus {
* @brief Index Type * @brief Index Type
*/ */
enum class IndexType { enum class IndexType {
invalid = 0, INVALID = 0,
cpu_idmap, FLAT = 1,
gpu_ivfflat, IVFFLAT = 2,
gpu_ivfsq8, IVFSQ8 = 3,
mix_nsg, NSG = 4,
ivfsq8h, IVFSQ8H = 5,
}; };
enum class MetricType { enum class MetricType {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册