ValidationUtil.h 724 字节
Newer Older
J
jinhai 已提交
1 2 3 4 5 6 7 8
#pragma once

#include "Error.h"

namespace zilliz {
namespace milvus {
namespace server {

G
groot 已提交
9 10 11 12
class ValidationUtil {
public:
    static ServerError
    ValidateTableName(const std::string &table_name);
J
jinhai 已提交
13

G
groot 已提交
14 15
    static ServerError
    ValidateTableDimension(int64_t dimension);
J
jinhai 已提交
16

G
groot 已提交
17 18 19
    static ServerError
    ValidateTableIndexType(int32_t index_type);

G
groot 已提交
20 21 22 23 24 25 26 27 28
    static ServerError
    ValidateTableIndexNlist(int32_t nlist);

    static ServerError
    ValidateTableIndexFileSize(int32_t index_file_size);

    static ServerError
    ValidateTableIndexMetricType(int32_t metric_type);

G
groot 已提交
29 30 31 32 33 34
    static ServerError
    ValidateGpuIndex(uint32_t gpu_index);

    static ServerError
    GetGpuMemory(uint32_t gpu_index, size_t &memory);
};
J
jinhai 已提交
35 36 37 38

}
}
}