#include <ComPackSignedExpFloat.h>
|
| ComPackSignedExpFloat (unsigned nbits, unsigned maxexponent, double maxval, bool invert=false, bool center=false) |
|
virtual | ~ComPackSignedExpFloat () |
|
virtual StatusCode | pack (const double, d_ULong &) const |
|
virtual StatusCode | unpack (const d_ULong, double &) const |
|
void | print (std::ostream &s=std::cout) const |
|
| ComPackSignedExpFloat (unsigned nbits, unsigned maxexponent, double maxval, bool invert=false, bool center=false) |
|
virtual | ~ComPackSignedExpFloat () |
|
virtual StatusCode | pack (const double, d_ULong &) const |
|
virtual StatusCode | unpack (const d_ULong, double &) const |
|
void | print (std::ostream &s=std::cout) const |
|
| ComPackBase () |
|
| ComPackBase (double minval, double maxval, d_ULong bitrange) |
|
| ComPackBase (const ComPackBase &) |
|
| ComPackBase () |
|
| ComPackBase (double minval, double maxval, d_ULong bitrange) |
|
| ComPackBase (const ComPackBase &) |
|
virtual | ~ComPackBase () |
|
virtual | ~ComPackBase () |
|
virtual StatusCode | pack (const double, d_ULong &) const=0 |
|
virtual StatusCode | pack (const double, d_ULong &) const=0 |
|
virtual StatusCode | unpack (const d_ULong, double &) const=0 |
|
virtual StatusCode | unpack (const d_ULong, double &) const=0 |
|
virtual const double & | getMinVal () const |
|
virtual const double & | getMinVal () const |
|
virtual const double & | getMaxVal () const |
|
virtual const double & | getMaxVal () const |
|
virtual const double & | getRange () const |
|
virtual const double & | getRange () const |
|
d_ULong | bitRange () const |
|
d_ULong | bitRange () const |
|
d_ULong | bitMask () const |
|
d_ULong | bitMask () const |
|
ComPackBase & | operator= (const ComPackBase &) |
|
ComPackBase & | operator= (const ComPackBase &) |
|
|
enum | StatusCode {
TAG_OK
, TAG_BAD
, TAG_RANGE_ERROR
, TAG_VAL_ROUND_DOWN
,
TAG_VAL_ROUND_UP
, TAG_OK
, TAG_BAD
, TAG_RANGE_ERROR
,
TAG_VAL_ROUND_DOWN
, TAG_VAL_ROUND_UP
} |
|
enum | StatusCode {
TAG_OK
, TAG_BAD
, TAG_RANGE_ERROR
, TAG_VAL_ROUND_DOWN
,
TAG_VAL_ROUND_UP
, TAG_OK
, TAG_BAD
, TAG_RANGE_ERROR
,
TAG_VAL_ROUND_DOWN
, TAG_VAL_ROUND_UP
} |
|
enum | |
|
enum | |
|
double | _minVal |
|
double | _maxVal |
|
double | _valRange |
|
d_ULong | _bitRange |
|
d_ULong | _bitMask |
|
◆ ComPackSignedExpFloat() [1/2]
ComPackSignedExpFloat::ComPackSignedExpFloat |
( |
unsigned |
nbits, |
|
|
unsigned |
maxexponent, |
|
|
double |
maxval, |
|
|
bool |
invert = false , |
|
|
bool |
center = false |
|
) |
| |
Definition at line 30 of file ComPackSignedExpFloat.cxx.
34 :
36 _packer(nbits-1,maxexponent,invert?maxval:0.0,
37 invert?0.0:maxval, center),
38 _signbit(1<<nbits-1),_signmask(~(1<<nbits-1))
39{
40 assert(maxval>0.0);
41}
◆ ~ComPackSignedExpFloat() [1/2]
ComPackSignedExpFloat::~ComPackSignedExpFloat |
( |
| ) |
|
|
virtual |
◆ ComPackSignedExpFloat() [2/2]
ComPackSignedExpFloat::ComPackSignedExpFloat |
( |
unsigned |
nbits, |
|
|
unsigned |
maxexponent, |
|
|
double |
maxval, |
|
|
bool |
invert = false , |
|
|
bool |
center = false |
|
) |
| |
◆ ~ComPackSignedExpFloat() [2/2]
virtual ComPackSignedExpFloat::~ComPackSignedExpFloat |
( |
| ) |
|
|
virtual |
◆ pack() [1/2]
Definition at line 47 of file ComPackSignedExpFloat.cxx.
47 {
48
50 _packer.
pack(fabs(value),packdata);
52 if(value>0)
53 packdata &= _signmask;
54 else
55 packdata |= _signbit;
56 }
57 return retval;
58}
virtual StatusCode pack(const double, d_ULong &) const
◆ pack() [2/2]
◆ print() [1/2]
void ComPackSignedExpFloat::print |
( |
std::ostream & |
s = std::cout | ) |
const |
◆ print() [2/2]
void ComPackSignedExpFloat::print |
( |
std::ostream & |
s = std::cout | ) |
const |
◆ unpack() [1/2]
Implements ComPackBase< double >.
Definition at line 61 of file ComPackSignedExpFloat.cxx.
61 {
63 _packer.
unpack(packdata,value);
64 if (value < 0)
65 value = 0;
66 else if(packdata&_signbit)
67 value *= -1.0;
68 return retval;
69}
virtual StatusCode unpack(const d_ULong, double &) const
◆ unpack() [2/2]
virtual StatusCode ComPackSignedExpFloat::unpack |
( |
const |
d_ULong, |
|
|
double & |
|
|
) |
| const |
|
virtual |
The documentation for this class was generated from the following files: