mirror of
https://gitee.com/milvus-io/milvus.git
synced 2025-12-29 23:15:28 +08:00
MS-575 Add Clang-format & Clang-tidy & Cpplint
Former-commit-id: 1a941a50fcdeaa0193be5c6d0031781bc3775d1e
This commit is contained in:
parent
e43d93fc40
commit
406fc339cc
@ -76,7 +76,7 @@ ConvertToDataset(std::vector<SPTAG::QueryResult> 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) {
|
||||
|
||||
@ -36,7 +36,7 @@ struct BufferDeleter {
|
||||
free((void*)buffer->data());
|
||||
}
|
||||
};
|
||||
}
|
||||
} // namespace internal
|
||||
|
||||
inline BufferPtr
|
||||
MakeBufferSmart(uint8_t* data, const int64_t size) {
|
||||
|
||||
@ -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;
|
||||
|
||||
@ -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:
|
||||
|
||||
@ -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;
|
||||
|
||||
|
||||
@ -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");
|
||||
}
|
||||
|
||||
@ -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
|
||||
|
||||
|
||||
@ -43,6 +43,6 @@ class HybridPass : public Pass {
|
||||
|
||||
using HybridPassPtr = std::shared_ptr<HybridPass>;
|
||||
|
||||
}
|
||||
}
|
||||
} // namespace scheduler
|
||||
} // namespace milvus
|
||||
|
||||
|
||||
@ -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
|
||||
|
||||
|
||||
@ -46,6 +46,6 @@ class Optimizer {
|
||||
std::vector<PassPtr> pass_list_;
|
||||
};
|
||||
|
||||
}
|
||||
}
|
||||
} // namespace scheduler
|
||||
} // namespace milvus
|
||||
|
||||
|
||||
@ -42,5 +42,5 @@ class Pass {
|
||||
};
|
||||
using PassPtr = std::shared_ptr<Pass>;
|
||||
|
||||
}
|
||||
}
|
||||
} // namespace scheduler
|
||||
} // namespace milvus
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user