15#ifndef poplar_IeeeHalf_hpp
16#define poplar_IeeeHalf_hpp
49 operator float()
const;
55 uint16_t
bit16()
const {
return ihalf; }
62 uint32_t
bitz32()
const {
return (uint32_t)ihalf; }
72 bool operator<(
float other)
const;
73 bool operator>(
float other)
const;
74 bool operator<=(
float other)
const;
75 bool operator>=(
float other)
const;
76 bool operator==(
IeeeHalf other)
const;
77 bool operator!=(
IeeeHalf other)
const;
84 bool operator==(
float other)
const;
85 bool operator!=(
float other)
const;
A IeeeHalf.
Definition: IeeeHalf.hpp:27
IeeeHalf()=default
Uninitialised.
uint16_t bit16() const
Obtain half-precision bit-pattern.
Definition: IeeeHalf.hpp:55
IeeeHalf(float value)
Initialise from a single-precision fp value.
uint32_t bitz32() const
Obtain half-precision bit-pattern.
Definition: IeeeHalf.hpp:62
static IeeeHalf fromBits(uint16_t bitPattern)
Initialise from a raw 16-bit pattern (conforming to IEEE 754-2008 binary16 format)
Poplar classes and functions.
Definition: ArrayRef.hpp:14