23enum class DataType : uint8_t {
42 static constexpr DataType kValue = DataType::Bool;
46 static constexpr DataType kValue = DataType::Int16;
50 static constexpr DataType kValue = DataType::Int32;
54 static constexpr DataType kValue = DataType::Int64;
58 static constexpr DataType kValue = DataType::Float32;
62 static constexpr DataType kValue = DataType::Float64;
75inline DataType type_upcast(DataType a_type, DataType b_type) {
76 return static_cast<DataType
>(
77 std::max(
static_cast<uint8_t
>(a_type),
static_cast<uint8_t
>(b_type)));
80inline std::ostream& operator<<(std::ostream& os, DataType dtype) {
94 case DataType::Float32:
97 case DataType::Float64:
101 os <<
"Unknown DataType";
109#define LMP_X_TYPES(_) \
117#define LMP_LIST_TYPES (bool, int16_t, int, int64_t, float, double)