diff --git a/internal/core/src/common/BitsetView.cpp b/internal/core/src/common/BitsetView.cpp deleted file mode 100644 index a1ced54442..0000000000 --- a/internal/core/src/common/BitsetView.cpp +++ /dev/null @@ -1,31 +0,0 @@ -// Licensed to the LF AI & Data foundation under one -// or more contributor license agreements. See the NOTICE file -// distributed with this work for additional information -// regarding copyright ownership. The ASF licenses this file -// to you under the Apache License, Version 2.0 (the -// "License"); you may not use this file except in compliance -// with the License. You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -#include "common/BitsetView.h" - -namespace milvus { - -BitsetView -BitsetView::subview(size_t offset, size_t size) const { - if (empty()) { - return BitsetView(); - } - assert(offset % 8 == 0); - assert((offset + size) <= this.size()); - return BitsetView(data() + offset / 8, size); -} - -} // namespace milvus diff --git a/internal/core/src/common/BitsetView.h b/internal/core/src/common/BitsetView.h index 12e9baefb0..a5ab535a2d 100644 --- a/internal/core/src/common/BitsetView.h +++ b/internal/core/src/common/BitsetView.h @@ -18,22 +18,21 @@ #include #include + #include "common/Types.h" #include "knowhere/utils/BitsetView.h" namespace milvus { class BitsetView : public faiss::BitsetView { - using BaseBitsetView = faiss::BitsetView; - public: BitsetView() = default; ~BitsetView() = default; - BitsetView(const std::nullptr_t value) : BaseBitsetView(value) { // NOLINT + BitsetView(const std::nullptr_t value) : faiss::BitsetView(value) { // NOLINT } - BitsetView(const uint8_t* data, size_t num_bits) : BaseBitsetView(data, num_bits) { // NOLINT + BitsetView(const uint8_t* data, size_t num_bits) : faiss::BitsetView(data, num_bits) { // NOLINT } BitsetView(const BitsetType& bitset) // NOLINT @@ -47,7 +46,14 @@ class BitsetView : public faiss::BitsetView { } BitsetView - subview(size_t pos, size_t count) const; + subview(size_t offset, size_t size) const { + if (empty()) { + return BitsetView(); + } + assert((offset & 0x7) == 0); + assert((offset + size) <= this->size()); + return BitsetView(data() + (offset >> 3), size); + } }; } // namespace milvus diff --git a/internal/core/src/common/CMakeLists.txt b/internal/core/src/common/CMakeLists.txt index c7da3b1992..7c894d451c 100644 --- a/internal/core/src/common/CMakeLists.txt +++ b/internal/core/src/common/CMakeLists.txt @@ -12,7 +12,6 @@ set(COMMON_SRC Schema.cpp Types.cpp - BitsetView.cpp SystemProperty.cpp vector_index_c.cpp ) diff --git a/internal/core/thirdparty/knowhere/CMakeLists.txt b/internal/core/thirdparty/knowhere/CMakeLists.txt index 66cfe1685f..d6b4847170 100644 --- a/internal/core/thirdparty/knowhere/CMakeLists.txt +++ b/internal/core/thirdparty/knowhere/CMakeLists.txt @@ -11,8 +11,8 @@ # or implied. See the License for the specific language governing permissions and limitations under the License. #------------------------------------------------------------------------------- -set( KNOWHERE_VERSION v1.1.4 ) -set( KNOWHERE_SOURCE_MD5 "605a11509d54e4af1f6c4f23de8beaa9" ) +set( KNOWHERE_VERSION v1.1.5 ) +set( KNOWHERE_SOURCE_MD5 "5baa7ecaea0e9e5c9f3f440cf8757d3c") if ( DEFINED ENV{MILVUS_KNOWHERE_URL} ) set( KNOWHERE_SOURCE_URL "$ENV{MILVUS_KNOWHERE_URL}" ) @@ -21,13 +21,6 @@ else () "https://github.com/milvus-io/knowhere/archive/refs/tags/${KNOWHERE_VERSION}.tar.gz" ) endif () -if (MSYS) - # TODO(matrixji) replace with official release after `support windows` merged/tagged - # windows adaptation + milvus-io/knowhere@v1.1.3 - set (KNOWHERE_SOURCE_URL "https://github.com/matrixji/knowhere/archive/refs/tags/v1.1.3-win.tar.gz") - set (KNOWHERE_SOURCE_MD5 "58021c73c4dc9fce40f429c02968bf79") -endif (MSYS) - macro(build_knowhere) message(STATUS "Building knowhere-${KNOWHERE_VERSION} from source") set (KNOWHERE_INSTALL_PREFIX ${CMAKE_INSTALL_PREFIX}) @@ -40,7 +33,7 @@ macro(build_knowhere) externalproject_add(knowhere_ep #GIT_REPOSITORY "https://github.com/milvus-io/knowhere.git" - #GIT_TAG v1.0.1 + #GIT_TAG main URL ${KNOWHERE_SOURCE_URL} URL_MD5 ${KNOWHERE_SOURCE_MD5} CMAKE_ARGS ${KNOWHERE_CMAKE_ARGS}