gem5 v24.0.0.0
Loading...
Searching...
No Matches
sc_dt::sc_fxval Class Reference

#include <sc_fxval.hh>

Public Member Functions

 sc_fxval (scfx_rep *)
 
 sc_fxval (sc_fxval_observer *=0)
 
 sc_fxval (int, sc_fxval_observer *=0)
 
 sc_fxval (unsigned int, sc_fxval_observer *=0)
 
 sc_fxval (long, sc_fxval_observer *=0)
 
 sc_fxval (unsigned long, sc_fxval_observer *=0)
 
 sc_fxval (float, sc_fxval_observer *=0)
 
 sc_fxval (double, sc_fxval_observer *=0)
 
 sc_fxval (const char *, sc_fxval_observer *=0)
 
 sc_fxval (const sc_fxval &, sc_fxval_observer *=0)
 
 sc_fxval (const sc_fxval_fast &, sc_fxval_observer *=0)
 
 sc_fxval (const sc_fxnum &, sc_fxval_observer *=0)
 
 sc_fxval (const sc_fxnum_fast &, sc_fxval_observer *=0)
 
 sc_fxval (int64, sc_fxval_observer *=0)
 
 sc_fxval (uint64, sc_fxval_observer *=0)
 
 sc_fxval (const sc_int_base &, sc_fxval_observer *=0)
 
 sc_fxval (const sc_uint_base &, sc_fxval_observer *=0)
 
 sc_fxval (const sc_signed &, sc_fxval_observer *=0)
 
 sc_fxval (const sc_unsigned &, sc_fxval_observer *=0)
 
 ~sc_fxval ()
 
const scfx_repget_rep () const
 
void set_rep (scfx_rep *)
 
const sc_fxval operator- () const
 
const sc_fxvaloperator+ () const
 
const sc_fxval operator++ (int)
 
const sc_fxval operator-- (int)
 
sc_fxvaloperator++ ()
 
sc_fxvaloperator-- ()
 
 operator double () const
 
short to_short () const
 
unsigned short to_ushort () const
 
int to_int () const
 
unsigned int to_uint () const
 
long to_long () const
 
unsigned long to_ulong () const
 
int64 to_int64 () const
 
uint64 to_uint64 () const
 
float to_float () const
 
double to_double () const
 
const std::string to_string () const
 
const std::string to_string (sc_numrep) const
 
const std::string to_string (sc_numrep, bool) const
 
const std::string to_string (sc_fmt) const
 
const std::string to_string (sc_numrep, sc_fmt) const
 
const std::string to_string (sc_numrep, bool, sc_fmt) const
 
const std::string to_dec () const
 
const std::string to_bin () const
 
const std::string to_oct () const
 
const std::string to_hex () const
 
bool is_neg () const
 
bool is_zero () const
 
bool is_nan () const
 
bool is_inf () const
 
bool is_normal () const
 
bool rounding_flag () const
 
void print (::std::ostream &=::std::cout) const
 
void scan (::std::istream &=::std::cin)
 
void dump (::std::ostream &=::std::cout) const
 
bool get_bit (int) const
 

Protected Member Functions

sc_fxval_observerobserver () const
 
sc_fxval_observerlock_observer () const
 
void unlock_observer (sc_fxval_observer *) const
 
void get_type (int &, int &, sc_enc &) const
 
const sc_fxval quantization (const scfx_params &, bool &) const
 
const sc_fxval overflow (const scfx_params &, bool &) const
 

Private Attributes

scfx_repm_rep
 
sc_fxval_observerm_observer
 

Friends

class sc_fxnum
 
void neg (sc_fxval &c, const sc_fxval &a)
 
const sc_fxval operator/ (const sc_fxval &a, const sc_fxval &b)
 
const sc_fxval operator<< (const sc_fxval &a, int b)
 
const sc_fxval operator>> (const sc_fxval &a, int b)
 
void lshift (sc_fxval &c, const sc_fxval &a, int b)
 
void rshift (sc_fxval &c, const sc_fxval &a, int b)
 

Detailed Description

Definition at line 86 of file sc_fxval.hh.

Constructor & Destructor Documentation

◆ sc_fxval() [1/19]

sc_dt::sc_fxval::sc_fxval ( scfx_rep * a)
inlineexplicit

Definition at line 662 of file sc_fxval.hh.

◆ sc_fxval() [2/19]

sc_dt::sc_fxval::sc_fxval ( sc_fxval_observer * observer_ = 0)
inlineexplicit

Definition at line 669 of file sc_fxval.hh.

References SC_FXVAL_OBSERVER_CONSTRUCT_, and SC_FXVAL_OBSERVER_DEFAULT_.

◆ sc_fxval() [3/19]

sc_dt::sc_fxval::sc_fxval ( int ,
sc_fxval_observer * = 0 )
explicit

◆ sc_fxval() [4/19]

sc_dt::sc_fxval::sc_fxval ( unsigned int ,
sc_fxval_observer * = 0 )
explicit

◆ sc_fxval() [5/19]

sc_dt::sc_fxval::sc_fxval ( long ,
sc_fxval_observer * = 0 )
explicit

◆ sc_fxval() [6/19]

sc_dt::sc_fxval::sc_fxval ( unsigned long ,
sc_fxval_observer * = 0 )
explicit

◆ sc_fxval() [7/19]

sc_dt::sc_fxval::sc_fxval ( float ,
sc_fxval_observer * = 0 )
explicit

◆ sc_fxval() [8/19]

sc_dt::sc_fxval::sc_fxval ( double ,
sc_fxval_observer * = 0 )
explicit

◆ sc_fxval() [9/19]

sc_dt::sc_fxval::sc_fxval ( const char * ,
sc_fxval_observer * = 0 )
explicit

◆ sc_fxval() [10/19]

sc_dt::sc_fxval::sc_fxval ( const sc_fxval & a,
sc_fxval_observer * observer_ = 0 )
inline

◆ sc_fxval() [11/19]

sc_dt::sc_fxval::sc_fxval ( const sc_fxval_fast & ,
sc_fxval_observer * = 0 )

◆ sc_fxval() [12/19]

sc_dt::sc_fxval::sc_fxval ( const sc_fxnum & a,
sc_fxval_observer * observer_ = 0 )
inline

◆ sc_fxval() [13/19]

sc_dt::sc_fxval::sc_fxval ( const sc_fxnum_fast & a,
sc_fxval_observer * observer_ = 0 )
inline

◆ sc_fxval() [14/19]

sc_dt::sc_fxval::sc_fxval ( int64 ,
sc_fxval_observer * = 0 )
explicit

◆ sc_fxval() [15/19]

sc_dt::sc_fxval::sc_fxval ( uint64 ,
sc_fxval_observer * = 0 )
explicit

◆ sc_fxval() [16/19]

sc_dt::sc_fxval::sc_fxval ( const sc_int_base & ,
sc_fxval_observer * = 0 )
explicit

◆ sc_fxval() [17/19]

sc_dt::sc_fxval::sc_fxval ( const sc_uint_base & ,
sc_fxval_observer * = 0 )
explicit

◆ sc_fxval() [18/19]

sc_dt::sc_fxval::sc_fxval ( const sc_signed & ,
sc_fxval_observer * = 0 )
explicit

◆ sc_fxval() [19/19]

sc_dt::sc_fxval::sc_fxval ( const sc_unsigned & ,
sc_fxval_observer * = 0 )
explicit

◆ ~sc_fxval()

sc_dt::sc_fxval::~sc_fxval ( )
inline

Definition at line 719 of file sc_fxval.hh.

References m_rep, and SC_FXVAL_OBSERVER_DESTRUCT_.

Member Function Documentation

◆ dump()

void sc_dt::sc_fxval::dump ( ::std::ostream & os = ::std::cout) const

Definition at line 142 of file sc_fxval.cc.

References sc_dt::scfx_rep::dump(), and m_rep.

◆ get_bit()

bool sc_dt::sc_fxval::get_bit ( int i) const
inline

Definition at line 1262 of file sc_fxval.hh.

References sc_dt::scfx_rep::get_bit(), and m_rep.

◆ get_rep()

const scfx_rep * sc_dt::sc_fxval::get_rep ( ) const
inline

Definition at line 727 of file sc_fxval.hh.

References m_rep, and SC_FXVAL_OBSERVER_READ_.

◆ get_type()

void sc_dt::sc_fxval::get_type ( int & wl,
int & iwl,
sc_enc & enc ) const
inlineprotected

Definition at line 1269 of file sc_fxval.hh.

References sc_dt::scfx_rep::get_type(), and m_rep.

◆ is_inf()

bool sc_dt::sc_fxval::is_inf ( ) const
inline

Definition at line 1241 of file sc_fxval.hh.

References sc_dt::scfx_rep::is_inf(), m_rep, and SC_FXVAL_OBSERVER_READ_.

◆ is_nan()

bool sc_dt::sc_fxval::is_nan ( ) const
inline

Definition at line 1234 of file sc_fxval.hh.

References sc_dt::scfx_rep::is_nan(), m_rep, and SC_FXVAL_OBSERVER_READ_.

◆ is_neg()

bool sc_dt::sc_fxval::is_neg ( ) const
inline

Definition at line 1220 of file sc_fxval.hh.

References sc_dt::scfx_rep::is_neg(), m_rep, and SC_FXVAL_OBSERVER_READ_.

◆ is_normal()

bool sc_dt::sc_fxval::is_normal ( ) const
inline

Definition at line 1248 of file sc_fxval.hh.

References sc_dt::scfx_rep::is_normal(), m_rep, and SC_FXVAL_OBSERVER_READ_.

◆ is_zero()

bool sc_dt::sc_fxval::is_zero ( ) const
inline

Definition at line 1227 of file sc_fxval.hh.

References sc_dt::scfx_rep::is_zero(), m_rep, and SC_FXVAL_OBSERVER_READ_.

◆ lock_observer()

sc_fxval_observer * sc_dt::sc_fxval::lock_observer ( ) const
protected

Definition at line 160 of file sc_fxval.cc.

References m_observer, and SC_ASSERT_.

◆ observer()

sc_fxval_observer * sc_dt::sc_fxval::observer ( ) const
inlineprotected

Definition at line 659 of file sc_fxval.hh.

References m_observer.

◆ operator double()

sc_dt::sc_fxval::operator double ( ) const
inline

Definition at line 1141 of file sc_fxval.hh.

References m_rep, SC_FXVAL_OBSERVER_READ_, and sc_dt::scfx_rep::to_double().

◆ operator+()

const sc_fxval & sc_dt::sc_fxval::operator+ ( ) const
inline

Definition at line 751 of file sc_fxval.hh.

◆ operator++() [1/2]

sc_fxval & sc_dt::sc_fxval::operator++ ( )
inline

Definition at line 1127 of file sc_fxval.hh.

◆ operator++() [2/2]

const sc_fxval sc_dt::sc_fxval::operator++ ( int )
inline

Definition at line 1111 of file sc_fxval.hh.

References c.

◆ operator-()

const sc_fxval sc_dt::sc_fxval::operator- ( ) const
inline

Definition at line 744 of file sc_fxval.hh.

References m_rep, sc_dt::neg_scfx_rep(), sc_fxval, and SC_FXVAL_OBSERVER_READ_.

◆ operator--() [1/2]

sc_fxval & sc_dt::sc_fxval::operator-- ( )
inline

Definition at line 1134 of file sc_fxval.hh.

◆ operator--() [2/2]

const sc_fxval sc_dt::sc_fxval::operator-- ( int )
inline

Definition at line 1119 of file sc_fxval.hh.

References c.

◆ overflow()

const sc_fxval sc_dt::sc_fxval::overflow ( const scfx_params & params,
bool & o_flag ) const
inlineprotected

Definition at line 1281 of file sc_fxval.hh.

References m_rep, sc_dt::overflow_scfx_rep(), and sc_fxval.

◆ print()

void sc_dt::sc_fxval::print ( ::std::ostream & os = ::std::cout) const

Definition at line 131 of file sc_fxval.cc.

References m_rep, and sc_dt::scfx_rep::print().

◆ quantization()

const sc_fxval sc_dt::sc_fxval::quantization ( const scfx_params & params,
bool & q_flag ) const
inlineprotected

Definition at line 1275 of file sc_fxval.hh.

References m_rep, sc_dt::quantization_scfx_rep(), and sc_fxval.

◆ rounding_flag()

bool sc_dt::sc_fxval::rounding_flag ( ) const
inline

Definition at line 1255 of file sc_fxval.hh.

References m_rep, and sc_dt::scfx_rep::rounding_flag().

◆ scan()

void sc_dt::sc_fxval::scan ( ::std::istream & is = ::std::cin)

Definition at line 134 of file sc_fxval.cc.

◆ set_rep()

void sc_dt::sc_fxval::set_rep ( scfx_rep * rep_)
inline

Definition at line 735 of file sc_fxval.hh.

References m_rep, and SC_FXVAL_OBSERVER_WRITE_.

◆ to_bin()

const std::string sc_dt::sc_fxval::to_bin ( ) const

Definition at line 111 of file sc_fxval.cc.

References m_rep, and sc_dt::scfx_rep::to_string().

◆ to_dec()

const std::string sc_dt::sc_fxval::to_dec ( ) const

Definition at line 105 of file sc_fxval.cc.

References m_rep, and sc_dt::scfx_rep::to_string().

◆ to_double()

double sc_dt::sc_fxval::to_double ( ) const
inline

Definition at line 1212 of file sc_fxval.hh.

References m_rep, SC_FXVAL_OBSERVER_READ_, and sc_dt::scfx_rep::to_double().

◆ to_float()

float sc_dt::sc_fxval::to_float ( ) const
inline

Definition at line 1205 of file sc_fxval.hh.

References m_rep, SC_FXVAL_OBSERVER_READ_, and sc_dt::scfx_rep::to_double().

◆ to_hex()

const std::string sc_dt::sc_fxval::to_hex ( ) const

Definition at line 123 of file sc_fxval.cc.

References m_rep, and sc_dt::scfx_rep::to_string().

◆ to_int()

int sc_dt::sc_fxval::to_int ( ) const
inline

Definition at line 1163 of file sc_fxval.hh.

References m_rep, SC_FXVAL_OBSERVER_READ_, and sc_dt::scfx_rep::to_uint64().

◆ to_int64()

int64 sc_dt::sc_fxval::to_int64 ( ) const
inline

Definition at line 1170 of file sc_fxval.hh.

References m_rep, SC_FXVAL_OBSERVER_READ_, and sc_dt::scfx_rep::to_uint64().

◆ to_long()

long sc_dt::sc_fxval::to_long ( ) const
inline

Definition at line 1191 of file sc_fxval.hh.

References m_rep, SC_FXVAL_OBSERVER_READ_, and sc_dt::scfx_rep::to_uint64().

◆ to_oct()

const std::string sc_dt::sc_fxval::to_oct ( ) const

Definition at line 117 of file sc_fxval.cc.

References m_rep, and sc_dt::scfx_rep::to_string().

◆ to_short()

short sc_dt::sc_fxval::to_short ( ) const
inline

Definition at line 1149 of file sc_fxval.hh.

References m_rep, SC_FXVAL_OBSERVER_READ_, and sc_dt::scfx_rep::to_uint64().

◆ to_string() [1/6]

const std::string sc_dt::sc_fxval::to_string ( ) const

Definition at line 68 of file sc_fxval.cc.

References m_rep, and sc_dt::scfx_rep::to_string().

◆ to_string() [2/6]

const std::string sc_dt::sc_fxval::to_string ( sc_fmt fmt) const

Definition at line 86 of file sc_fxval.cc.

References m_rep, and sc_dt::scfx_rep::to_string().

◆ to_string() [3/6]

const std::string sc_dt::sc_fxval::to_string ( sc_numrep numrep) const

Definition at line 74 of file sc_fxval.cc.

References m_rep, and sc_dt::scfx_rep::to_string().

◆ to_string() [4/6]

const std::string sc_dt::sc_fxval::to_string ( sc_numrep numrep,
bool w_prefix ) const

Definition at line 80 of file sc_fxval.cc.

References m_rep, and sc_dt::scfx_rep::to_string().

◆ to_string() [5/6]

const std::string sc_dt::sc_fxval::to_string ( sc_numrep numrep,
bool w_prefix,
sc_fmt fmt ) const

Definition at line 98 of file sc_fxval.cc.

References m_rep, and sc_dt::scfx_rep::to_string().

◆ to_string() [6/6]

const std::string sc_dt::sc_fxval::to_string ( sc_numrep numrep,
sc_fmt fmt ) const

Definition at line 92 of file sc_fxval.cc.

References m_rep, and sc_dt::scfx_rep::to_string().

◆ to_uint()

unsigned int sc_dt::sc_fxval::to_uint ( ) const
inline

Definition at line 1177 of file sc_fxval.hh.

References m_rep, SC_FXVAL_OBSERVER_READ_, and sc_dt::scfx_rep::to_uint64().

◆ to_uint64()

uint64 sc_dt::sc_fxval::to_uint64 ( ) const
inline

Definition at line 1184 of file sc_fxval.hh.

References m_rep, SC_FXVAL_OBSERVER_READ_, and sc_dt::scfx_rep::to_uint64().

◆ to_ulong()

unsigned long sc_dt::sc_fxval::to_ulong ( ) const
inline

Definition at line 1198 of file sc_fxval.hh.

References m_rep, SC_FXVAL_OBSERVER_READ_, and sc_dt::scfx_rep::to_uint64().

◆ to_ushort()

unsigned short sc_dt::sc_fxval::to_ushort ( ) const
inline

Definition at line 1156 of file sc_fxval.hh.

References m_rep, SC_FXVAL_OBSERVER_READ_, and sc_dt::scfx_rep::to_uint64().

◆ unlock_observer()

void sc_dt::sc_fxval::unlock_observer ( sc_fxval_observer * observer_) const
protected

Definition at line 169 of file sc_fxval.cc.

References m_observer, and SC_ASSERT_.

Friends And Related Symbol Documentation

◆ lshift

void lshift ( sc_fxval & c,
const sc_fxval & a,
int b )
friend

Definition at line 922 of file sc_fxval.hh.

◆ neg

void neg ( sc_fxval & c,
const sc_fxval & a )
friend

Definition at line 759 of file sc_fxval.hh.

◆ operator/

const sc_fxval operator/ ( const sc_fxval & a,
const sc_fxval & b )
friend

Definition at line 819 of file sc_fxval.hh.

◆ operator<<

const sc_fxval operator<< ( const sc_fxval & a,
int b )
friend

Definition at line 847 of file sc_fxval.hh.

◆ operator>>

const sc_fxval operator>> ( const sc_fxval & a,
int b )
friend

Definition at line 855 of file sc_fxval.hh.

◆ rshift

void rshift ( sc_fxval & c,
const sc_fxval & a,
int b )
friend

Definition at line 931 of file sc_fxval.hh.

◆ sc_fxnum

friend class sc_fxnum
friend

Definition at line 88 of file sc_fxval.hh.

Member Data Documentation

◆ m_observer

sc_fxval_observer* sc_dt::sc_fxval::m_observer
mutableprivate

◆ m_rep


The documentation for this class was generated from the following files:

Generated on Tue Jun 18 2024 16:24:55 for gem5 by doxygen 1.11.0