-
Notifications
You must be signed in to change notification settings - Fork 83
add ivf_flat_cc index #824
add ivf_flat_cc index #824
Conversation
@@ -402,6 +406,10 @@ class BaseConfig : public Config { | |||
.description("search for top k similar vector.") | |||
.set_range(1, std::numeric_limits<CFG_INT>::max()) | |||
.for_search(); | |||
KNOWHERE_CONFIG_DECLARE_FIELD(num_build_thread) | |||
.set_default(-1) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
-1 is a valid value ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I need a default value to indicate user has not set this value, and '-1' gives this semantic.
@@ -36,6 +36,18 @@ class IvfConfig : public BaseConfig { | |||
|
|||
class IvfFlatConfig : public IvfConfig {}; | |||
|
|||
class IvfFlatCcConfig : public IvfFlatConfig { | |||
public: | |||
int ssize; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it's better to name it to "segment_size"
@@ -92,6 +92,28 @@ const uint8_t* InvertedLists::get_single_code(size_t list_no, size_t offset) | |||
return get_codes(list_no) + offset * code_size; | |||
} | |||
|
|||
size_t InvertedLists::get_segment_num(size_t list_no) const { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
let's inline these functions
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It seems that inline virtual function is legal but gain no benefit in our case, since the function call use polymorphism mechanism determined at runtime but inline sign processed at compiler time. I find some material to support the viewpoint: https://www.geeksforgeeks.org/inline-virtual-function/
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/lgtm
/approve
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: foxspy, liliu-z The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Signed-off-by: xianliang <xianliang.li@zilliz.com>
/lgtm |
Issue #823
Add IVF_FLAT_CC to support running build & search on IVF index concurrently by following change