clang format

This commit is contained in:
youny626 2019-11-05 13:42:12 +08:00
parent bede77751e
commit 05dda4ab73
9 changed files with 27 additions and 23 deletions

View File

@ -1,3 +1,20 @@
// Licensed to the Apache Software Foundation (ASF) 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.
#define MILVUS_VERSION "0.5.0"
#define BUILD_TYPE "Debug"
#define BUILD_TIME "2019-11-05 13:20.31"
#define BUILD_TIME "2019-11-05 13:39.33"

View File

@ -15,7 +15,7 @@
// specific language governing permissions and limitations
// under the License.
#include "IndexGPUIDMAP.h"
#include "knowhere/index/vector_index/IndexGPUIDMAP.h"
#include <faiss/AutoTune.h>
#include <faiss/IndexFlat.h>

View File

@ -60,4 +60,4 @@ class GPUIDMAP : public IDMAP, public GPUIndex {
using GPUIDMAPPtr = std::shared_ptr<GPUIDMAP>;
} // namespace knowhere
} // namespace knowhere

View File

@ -31,7 +31,6 @@
#include "knowhere/index/vector_index/IndexGPUIVFSQ.h"
#include "knowhere/index/vector_index/helpers/FaissGpuResourceMgr.h"
#endif
#include "knowhere/index/vector_index/IndexIVFSQ.h"
namespace knowhere {

View File

@ -79,9 +79,7 @@ ResourceMgr::Add(ResourcePtr&& resource) {
gpu_resources_.emplace_back(ResourceWPtr(resource));
break;
}
default: {
break;
}
default: { break; }
}
resources_.emplace_back(resource);

View File

@ -123,9 +123,7 @@ Scheduler::OnLoadCompleted(const EventPtr& event) {
Action::PushTaskToAllNeighbour(load_completed_event->task_table_item_, resource);
break;
}
default: {
break;
}
default: { break; }
}
resource->WakeupLoader();
}

View File

@ -44,9 +44,7 @@ ToString(ResourceType type) {
case ResourceType::GPU: {
return "GPU";
}
default: {
return "UNKNOWN";
}
default: { return "UNKNOWN"; }
}
}

View File

@ -168,9 +168,7 @@ GetVecIndexFactory(const IndexType& type, const Config& cfg) {
index = std::make_shared<knowhere::NSG>(gpu_device);
break;
}
default: {
return nullptr;
}
default: { return nullptr; }
}
return std::make_shared<VecIndexImpl>(index, type);
}
@ -278,9 +276,7 @@ ConvertToCpuIndexType(const IndexType& type) {
case IndexType::FAISS_IVFSQ8_MIX: {
return IndexType::FAISS_IVFSQ8_CPU;
}
default: {
return type;
}
default: { return type; }
}
}
@ -295,9 +291,7 @@ ConvertToGpuIndexType(const IndexType& type) {
case IndexType::FAISS_IVFSQ8_CPU: {
return IndexType::FAISS_IVFSQ8_GPU;
}
default: {
return type;
}
default: { return type; }
}
}

View File

@ -15,7 +15,7 @@
// specific language governing permissions and limitations
// under the License.
#include "GPUVecImpl.h"
#include "wrapper/gpu/GPUVecImpl.h"
#include "knowhere/common/Exception.h"
#include "knowhere/index/vector_index/IndexGPUIDMAP.h"
#include "knowhere/index/vector_index/IndexGPUIVF.h"