OpenASIP
2.0
|
#include <HalfFloatWord.hh>
Public Member Functions | |
operator float () const | |
HalfFloatWord (uint16_t binaryRep) | |
HalfFloatWord (float value) | |
HalfFloatWord (const HalfFloatWord &hw) | |
HalfFloatWord () | |
HalfFloatWord | operator+ (const HalfFloatWord &right) const |
HalfFloatWord | operator- (const HalfFloatWord &right) const |
HalfFloatWord | operator* (const HalfFloatWord &right) const |
HalfFloatWord | operator/ (const HalfFloatWord &right) const |
const HalfFloatWord & | operator= (float value) |
const HalfFloatWord & | operator= (const HalfFloatWord &value) |
uint16_t | getBinaryRep () const |
Static Public Member Functions | |
static uint16_t | convertFloatToHalfWordRep (float value) |
static float | convertToFloat (HalfFloatWord value) |
Private Attributes | |
uint16_t | binaryRep_ |
Half-precision, IEE-754-2008 16-bit floating point number.
Definition at line 41 of file HalfFloatWord.hh.
|
explicit |
Definition at line 50 of file HalfFloatWord.cc.
|
explicit |
Definition at line 143 of file HalfFloatWord.cc.
HalfFloatWord::HalfFloatWord | ( | const HalfFloatWord & | hw | ) |
Definition at line 147 of file HalfFloatWord.cc.
HalfFloatWord::HalfFloatWord | ( | ) |
Definition at line 53 of file HalfFloatWord.cc.
Referenced by operator*(), operator+(), operator-(), and operator/().
|
static |
Definition at line 56 of file HalfFloatWord.cc.
References FloatConvUnion::f, and FloatConvUnion::i.
Referenced by operator=().
|
static |
Exact and slower version of operator float()-function.
Attempts to retain original presentation of the source half float.
Definition at line 99 of file HalfFloatWord.cc.
References FloatConvUnion::f, getBinaryRep(), and FloatConvUnion::u.
|
inline |
Definition at line 60 of file HalfFloatWord.hh.
References binaryRep_.
Referenced by convertToFloat(), SimValue::operator=(), and SimValue::operator==().
HalfFloatWord::operator float | ( | ) | const |
Definition at line 152 of file HalfFloatWord.cc.
HalfFloatWord HalfFloatWord::operator* | ( | const HalfFloatWord & | right | ) | const |
Definition at line 190 of file HalfFloatWord.cc.
References HalfFloatWord().
HalfFloatWord HalfFloatWord::operator+ | ( | const HalfFloatWord & | right | ) | const |
Definition at line 182 of file HalfFloatWord.cc.
References HalfFloatWord().
HalfFloatWord HalfFloatWord::operator- | ( | const HalfFloatWord & | right | ) | const |
Definition at line 186 of file HalfFloatWord.cc.
References HalfFloatWord().
HalfFloatWord HalfFloatWord::operator/ | ( | const HalfFloatWord & | right | ) | const |
Definition at line 194 of file HalfFloatWord.cc.
References HalfFloatWord().
const HalfFloatWord & HalfFloatWord::operator= | ( | const HalfFloatWord & | value | ) |
Definition at line 138 of file HalfFloatWord.cc.
References binaryRep_.
const HalfFloatWord & HalfFloatWord::operator= | ( | float | value | ) |
Definition at line 133 of file HalfFloatWord.cc.
References binaryRep_, and convertFloatToHalfWordRep().
|
private |
Definition at line 66 of file HalfFloatWord.hh.
Referenced by getBinaryRep(), and operator=().