Operand.h 1.0 KB
Newer Older
X
xj.lin 已提交
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
////////////////////////////////////////////////////////////////////////////////
// Copyright 上海赜睿信息科技有限公司(Zilliz) - All Rights Reserved
// Unauthorized copying of this file, via any medium is strictly prohibited.
// Proprietary and confidential.
////////////////////////////////////////////////////////////////////////////////

#pragma once

#include <string>
#include <memory>
#include <iostream>
#include <sstream>

namespace zilliz {
namespace vecwise {
namespace engine {

struct Operand {
    friend std::ostream &operator<<(std::ostream &os, const Operand &obj);

    friend std::istream &operator>>(std::istream &is, Operand &obj);

    int d;
    std::string index_type = "IVF13864,Flat";
X
xj.lin 已提交
25
    std::string metric_type = "L2"; //> L2 / Inner Product
X
xj.lin 已提交
26 27 28 29 30 31 32 33 34 35 36 37 38 39 40
    std::string preproc;
    std::string postproc;
    int ncent;
};

using Operand_ptr = std::shared_ptr<Operand>;

extern std::string operand_to_str(const Operand_ptr &opd);

extern Operand_ptr str_to_operand(const std::string &input);


}
}
}