mirror of
https://gitee.com/milvus-io/milvus.git
synced 2025-12-31 07:55:38 +08:00
31 lines
1.0 KiB
C++
31 lines
1.0 KiB
C++
/*******************************************************************************
|
|
* Copyright 上海赜睿信息科技有限公司(Zilliz) - All Rights Reserved
|
|
* Unauthorized copying of this file, via any medium is strictly prohibited.
|
|
* Proprietary and confidential.
|
|
******************************************************************************/
|
|
#include "EngineFactory.h"
|
|
#include "FaissExecutionEngine.h"
|
|
#include "Log.h"
|
|
|
|
namespace zilliz {
|
|
namespace milvus {
|
|
namespace engine {
|
|
|
|
ExecutionEnginePtr
|
|
EngineFactory::Build(uint16_t dimension,
|
|
const std::string& location,
|
|
EngineType type) {
|
|
switch(type) {
|
|
case EngineType::FAISS_IDMAP:
|
|
return ExecutionEnginePtr(new FaissExecutionEngine(dimension, location, "IDMap", "IDMap,Flat"));
|
|
case EngineType::FAISS_IVFFLAT:
|
|
return ExecutionEnginePtr(new FaissExecutionEngine(dimension, location, "IVF", "IDMap,Flat"));
|
|
default:
|
|
ENGINE_LOG_ERROR << "Unsupportted engine type";
|
|
return nullptr;
|
|
}
|
|
}
|
|
|
|
}
|
|
}
|
|
} |