CpuResource.cpp 920 字节
Newer Older
X
xj.lin 已提交
1 2 3 4 5 6 7 8 9 10 11 12 13
/*******************************************************************************
 * Copyright 上海赜睿信息科技有限公司(Zilliz) - All Rights Reserved
 * Unauthorized copying of this file, via any medium is strictly prohibited.
 * Proprietary and confidential.
 ******************************************************************************/

#include "CpuResource.h"


namespace zilliz {
namespace milvus {
namespace engine {

14 15 16 17
std::ostream &operator<<(std::ostream &out, const CpuResource &resource) {
    out << resource.Dump();
    return out;
}
X
xj.lin 已提交
18

19 20
CpuResource::CpuResource(std::string name, uint64_t device_id, bool enable_loader, bool enable_executor)
    : Resource(std::move(name), ResourceType::CPU, device_id, enable_loader, enable_executor) {}
X
xj.lin 已提交
21 22

void CpuResource::LoadFile(TaskPtr task) {
W
wxyu 已提交
23
    task->Load(LoadType::DISK2CPU, 0);
X
xj.lin 已提交
24 25 26
}

void CpuResource::Process(TaskPtr task) {
W
wxyu 已提交
27
    task->Execute();
X
xj.lin 已提交
28 29 30 31
}

}
}
W
wxyu 已提交
32
}