12 #include <unordered_map> 17 if (str ==
"uint32") {
18 return TypeInfo::kUInt32;
19 }
else if (str ==
"float32") {
20 return TypeInfo::kFloat32;
21 }
else if (str ==
"float64") {
22 return TypeInfo::kFloat64;
24 throw std::runtime_error(
"Unrecognized type");
25 return TypeInfo::kInvalid;
TypeInfo
Types used by thresholds and leaf outputs.
Defines TypeInfo class and utilities.
TypeInfo GetTypeInfoByName(const std::string &str)
conversion table from string to TypeInfo, defined in tables.cc