| 144 | } |
| 145 | |
| 146 | Status FloatFromFlatbuffer(const flatbuf::FloatingPoint* float_data, |
| 147 | std::shared_ptr<DataType>* out) { |
| 148 | if (float_data->precision() == flatbuf::Precision::Precision_HALF) { |
| 149 | *out = float16(); |
| 150 | } else if (float_data->precision() == flatbuf::Precision::Precision_SINGLE) { |
| 151 | *out = float32(); |
| 152 | } else { |
| 153 | *out = float64(); |
| 154 | } |
| 155 | return Status::OK(); |
| 156 | } |
| 157 | |
| 158 | Offset IntToFlatbuffer(FBB& fbb, int bitWidth, bool is_signed) { |
| 159 | return flatbuf::CreateInt(fbb, bitWidth, is_signed).Union(); |
no test coverage detected