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 {

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

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

17 18 19
    static ServerError
    ValidateTableIndexType(int32_t index_type);

S
starlord 已提交
20 21 22 23
    static ServerError
    ValidateTableIndexNlist(int32_t nlist);

    static ServerError
24
    ValidateTableIndexFileSize(int64_t index_file_size);
S
starlord 已提交
25 26 27 28

    static ServerError
    ValidateTableIndexMetricType(int32_t metric_type);

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

}
}
}