11 #include <unordered_map> 16 if (str ==
"uint32") {
17 return TypeInfo::kUInt32;
18 }
else if (str ==
"float32") {
19 return TypeInfo::kFloat32;
20 }
else if (str ==
"float64") {
21 return TypeInfo::kFloat64;
23 throw Error(
"Unrecognized type");
24 return TypeInfo::kInvalid;
Exception class that will be thrown by Treelite.
Exception class used throughout the Treelite codebase.
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