\brief Returns the type's fixed byte width, if any. Returns -1 for non-fixed-width types, and should only be used for subclasses of FixedWidthType
| 187 | /// for non-fixed-width types, and should only be used for |
| 188 | /// subclasses of FixedWidthType |
| 189 | virtual int32_t byte_width() const { |
| 190 | int32_t num_bits = this->bit_width(); |
| 191 | return num_bits > 0 ? num_bits / 8 : -1; |
| 192 | } |
| 193 | |
| 194 | /// \brief Returns the type's fixed bit width, if any. Returns -1 |
| 195 | /// for non-fixed-width types, and should only be used for |