diff --git a/cpp/src/core/knowhere/knowhere/adapter/SptagAdapter.cpp b/cpp/src/core/knowhere/knowhere/adapter/SptagAdapter.cpp index f4b1a7953f..b4c3910a01 100644 --- a/cpp/src/core/knowhere/knowhere/adapter/SptagAdapter.cpp +++ b/cpp/src/core/knowhere/knowhere/adapter/SptagAdapter.cpp @@ -76,7 +76,7 @@ ConvertToDataset(std::vector query_results) { auto p_id = (int64_t*)malloc(sizeof(int64_t) * elems); auto p_dist = (float*)malloc(sizeof(float) * elems); -// TODO: throw if malloc failed. + // TODO: throw if malloc failed. #pragma omp parallel for for (auto i = 0; i < query_results.size(); ++i) { diff --git a/cpp/src/core/knowhere/knowhere/common/Buffer.h b/cpp/src/core/knowhere/knowhere/common/Buffer.h index d95da18602..f9e15d95bd 100644 --- a/cpp/src/core/knowhere/knowhere/common/Buffer.h +++ b/cpp/src/core/knowhere/knowhere/common/Buffer.h @@ -36,7 +36,7 @@ struct BufferDeleter { free((void*)buffer->data()); } }; -} +} // namespace internal inline BufferPtr MakeBufferSmart(uint8_t* data, const int64_t size) { diff --git a/cpp/src/core/unittest/test_ivf.cpp b/cpp/src/core/unittest/test_ivf.cpp index a0da0eca8e..17eb888ddc 100644 --- a/cpp/src/core/unittest/test_ivf.cpp +++ b/cpp/src/core/unittest/test_ivf.cpp @@ -43,9 +43,9 @@ namespace kn = knowhere; } // namespace +using ::testing::Combine; using ::testing::TestWithParam; using ::testing::Values; -using ::testing::Combine; constexpr int device_id = 0; constexpr int64_t DIM = 128; diff --git a/cpp/src/core/unittest/test_kdt.cpp b/cpp/src/core/unittest/test_kdt.cpp index 6fa6ba33f3..f9e02bd9a4 100644 --- a/cpp/src/core/unittest/test_kdt.cpp +++ b/cpp/src/core/unittest/test_kdt.cpp @@ -34,9 +34,9 @@ namespace kn = knowhere; } // namespace +using ::testing::Combine; using ::testing::TestWithParam; using ::testing::Values; -using ::testing::Combine; class KDTTest : public DataGen, public ::testing::Test { protected: diff --git a/cpp/src/core/unittest/test_nsg/test_nsg.cpp b/cpp/src/core/unittest/test_nsg/test_nsg.cpp index 70261a63dc..b59f0d4928 100644 --- a/cpp/src/core/unittest/test_nsg/test_nsg.cpp +++ b/cpp/src/core/unittest/test_nsg/test_nsg.cpp @@ -32,9 +32,9 @@ namespace kn = knowhere; } // namespace +using ::testing::Combine; using ::testing::TestWithParam; using ::testing::Values; -using ::testing::Combine; constexpr int64_t DEVICE_ID = 1; diff --git a/cpp/src/db/insert/MemTableFile.cpp b/cpp/src/db/insert/MemTableFile.cpp index 5827513297..2c877c78ed 100644 --- a/cpp/src/db/insert/MemTableFile.cpp +++ b/cpp/src/db/insert/MemTableFile.cpp @@ -55,9 +55,9 @@ MemTableFile::CreateTableFile() { Status MemTableFile::Add(const VectorSourcePtr& source, IDNumbers& vector_ids) { if (table_file_schema_.dimension_ <= 0) { - std::string err_msg = "MemTableFile::Add: table_file_schema dimension = " + - std::to_string(table_file_schema_.dimension_) + ", table_id = " + - table_file_schema_.table_id_; + std::string err_msg = + "MemTableFile::Add: table_file_schema dimension = " + std::to_string(table_file_schema_.dimension_) + + ", table_id = " + table_file_schema_.table_id_; ENGINE_LOG_ERROR << err_msg; return Status(DB_ERROR, "Not able to create table file"); } diff --git a/cpp/src/scheduler/optimizer/HybridPass.cpp b/cpp/src/scheduler/optimizer/HybridPass.cpp index 1b0ab7c4d0..dbfab0f741 100644 --- a/cpp/src/scheduler/optimizer/HybridPass.cpp +++ b/cpp/src/scheduler/optimizer/HybridPass.cpp @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. -#include "HybridPass.h" +#include "cpp/src/scheduler/optimizer/HybridPass.h" #include "scheduler/task/SearchTask.h" namespace milvus { @@ -30,6 +30,6 @@ HybridPass::Run(const TaskPtr& task) { return false; } -} -} +} // namespace scheduler +} // namespace milvus diff --git a/cpp/src/scheduler/optimizer/HybridPass.h b/cpp/src/scheduler/optimizer/HybridPass.h index e043bf8ad5..1d1d1e227f 100644 --- a/cpp/src/scheduler/optimizer/HybridPass.h +++ b/cpp/src/scheduler/optimizer/HybridPass.h @@ -43,6 +43,6 @@ class HybridPass : public Pass { using HybridPassPtr = std::shared_ptr; -} -} +} // namespace scheduler +} // namespace milvus diff --git a/cpp/src/scheduler/optimizer/Optimizer.cpp b/cpp/src/scheduler/optimizer/Optimizer.cpp index 517cd85f79..6e02bfd1c8 100644 --- a/cpp/src/scheduler/optimizer/Optimizer.cpp +++ b/cpp/src/scheduler/optimizer/Optimizer.cpp @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. -#include "Optimizer.h" +#include "cpp/src/scheduler/optimizer/Optimizer.h" namespace milvus { namespace scheduler { @@ -38,6 +38,6 @@ Optimizer::Run(const TaskPtr& task) { return false; } -} -} +} // namespace scheduler +} // namespace milvus diff --git a/cpp/src/scheduler/optimizer/Optimizer.h b/cpp/src/scheduler/optimizer/Optimizer.h index cbb13a8fc2..1a6e0e5d6b 100644 --- a/cpp/src/scheduler/optimizer/Optimizer.h +++ b/cpp/src/scheduler/optimizer/Optimizer.h @@ -46,6 +46,6 @@ class Optimizer { std::vector pass_list_; }; -} -} +} // namespace scheduler +} // namespace milvus diff --git a/cpp/src/scheduler/optimizer/Pass.h b/cpp/src/scheduler/optimizer/Pass.h index 1c8def41a2..e63b1b369c 100644 --- a/cpp/src/scheduler/optimizer/Pass.h +++ b/cpp/src/scheduler/optimizer/Pass.h @@ -42,5 +42,5 @@ class Pass { }; using PassPtr = std::shared_ptr; -} -} +} // namespace scheduler +} // namespace milvus