struct nbla::float_bits

template<typename T>
struct float_bits : public nbla::nbits<T>

Public Static Functions

template<typename U>
static inline nbits<U>::bit_t downconvert_to(bit_t bits)

Downconvert T-type bits into U-type bits.

union {
  float fval;
  uint32_t fbits;
};
float_value = 1;
uint16_t half_bits = float_bits<float>::downconvert_to<Half>(float_bits);
template<typename U>
static inline U upconvert_to(bit_t bits)

Upconvert T-type bits into U-type bits.