ExecutionEngine.cpp 609 字节
Newer Older
X
Xu Peng 已提交
1
#include <easylogging++.h>
X
Xu Peng 已提交
2
#include "ExecutionEngine.h"
X
Xu Peng 已提交
3 4 5 6 7

namespace zilliz {
namespace vecwise {
namespace engine {

X
Xu Peng 已提交
8
Status ExecutionEngine::AddWithIds(const std::vector<float>& vectors, const std::vector<long>& vector_ids) {
X
Xu Peng 已提交
9 10 11 12
    long n1 = (long)vectors.size();
    long n2 = (long)vector_ids.size();
    if (n1 != n2) {
        LOG(ERROR) << "vectors size is not equal to the size of vector_ids: " << n1 << "!=" << n2;
X
Xu Peng 已提交
13
        return Status::Error("Error: AddWithIds");
X
Xu Peng 已提交
14 15 16 17 18 19 20 21
    }
    return AddWithIds(n1, vectors.data(), vector_ids.data());
}


} // namespace engine
} // namespace vecwise
} // namespace zilliz