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

#89 fix clang-format


Former-commit-id: 0c7feb7370d58e7511a1089d181d256e9c9e6905
上级 95b231a5
......@@ -54,7 +54,8 @@ elapsed() {
return tv.tv_sec + tv.tv_usec * 1e-6;
}
void normalize(float* arr, size_t nq, size_t dim) {
void
normalize(float* arr, size_t nq, size_t dim) {
for (size_t i = 0; i < nq; i++) {
double vecLen = 0.0;
for (size_t j = 0; j < dim; j++) {
......@@ -63,7 +64,7 @@ void normalize(float* arr, size_t nq, size_t dim) {
}
vecLen = std::sqrt(vecLen);
for (size_t j = 0; j < dim; j++) {
arr[i * dim + j] = (float) (arr[i * dim + j] / vecLen);
arr[i * dim + j] = (float)(arr[i * dim + j] / vecLen);
}
}
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册