Loading cpp/src/cache/DataObj.h +0 −1 Original line number Diff line number Diff line Loading @@ -17,7 +17,6 @@ #pragma once #include <memory> namespace milvus { Loading cpp/src/db/engine/ExecutionEngineImpl.cpp +53 −56 Original line number Diff line number Diff line Loading @@ -243,12 +243,9 @@ ExecutionEngineImpl::CopyToGpu(uint64_t device_id) { Status ExecutionEngineImpl::CopyToIndexFileToGpu(uint64_t device_id) { auto index = cache::GpuCacheMgr::GetInstance(device_id)->GetIndex(location_); bool already_in_cache = (index != nullptr); if (!already_in_cache) { cache::DataObjPtr obj = std::make_shared<cache::DataObj>(nullptr, PhysicalSize()); auto to_index_data = std::make_shared<ToIndexData>(PhysicalSize()); cache::DataObjPtr obj = std::static_pointer_cast<cache::DataObj>(to_index_data); milvus::cache::GpuCacheMgr::GetInstance(device_id)->InsertItem(location_, obj); } return Status::OK(); } Loading cpp/src/wrapper/VecImpl.h +14 −0 Original line number Diff line number Diff line Loading @@ -126,5 +126,19 @@ class BFIndex : public VecIndexImpl { GetRawIds(); }; class ToIndexData : public cache::DataObj { public: explicit ToIndexData(int64_t size) : size_(size) { } int64_t Size() override { return size_; } private: int64_t size_; }; } // namespace engine } // namespace milvus Loading
cpp/src/cache/DataObj.h +0 −1 Original line number Diff line number Diff line Loading @@ -17,7 +17,6 @@ #pragma once #include <memory> namespace milvus { Loading
cpp/src/db/engine/ExecutionEngineImpl.cpp +53 −56 Original line number Diff line number Diff line Loading @@ -243,12 +243,9 @@ ExecutionEngineImpl::CopyToGpu(uint64_t device_id) { Status ExecutionEngineImpl::CopyToIndexFileToGpu(uint64_t device_id) { auto index = cache::GpuCacheMgr::GetInstance(device_id)->GetIndex(location_); bool already_in_cache = (index != nullptr); if (!already_in_cache) { cache::DataObjPtr obj = std::make_shared<cache::DataObj>(nullptr, PhysicalSize()); auto to_index_data = std::make_shared<ToIndexData>(PhysicalSize()); cache::DataObjPtr obj = std::static_pointer_cast<cache::DataObj>(to_index_data); milvus::cache::GpuCacheMgr::GetInstance(device_id)->InsertItem(location_, obj); } return Status::OK(); } Loading
cpp/src/wrapper/VecImpl.h +14 −0 Original line number Diff line number Diff line Loading @@ -126,5 +126,19 @@ class BFIndex : public VecIndexImpl { GetRawIds(); }; class ToIndexData : public cache::DataObj { public: explicit ToIndexData(int64_t size) : size_(size) { } int64_t Size() override { return size_; } private: int64_t size_; }; } // namespace engine } // namespace milvus