SPUC  3.0
Public Types | Public Member Functions | Public Attributes | Static Public Attributes | List of all members
SPUC::spuc_int< I_ > Class Template Reference

A faster version of the older systemc spuc_int. More...

#include <spuc_int.h>

Collaboration diagram for SPUC::spuc_int< I_ >:
Collaboration graph
[legend]

Public Types

typedef int_type_size
< NEXT_INT_SIZE< I_ >::val >
::int_type 
val_type
 
typedef int64_t max_val_type
 

Public Member Functions

 spuc_int ()
 constructors More...
 
 spuc_int (const spuc_int &a)
 From exact same type - just copy val. More...
 
 spuc_int (const double &a)
 
 spuc_int (const int8_t &a)
 
 spuc_int (const int16_t &a)
 
 spuc_int (const int32_t &a)
 
 spuc_int (const int64_t &a)
 
 spuc_int (const uint8_t &a)
 
 spuc_int (const uint16_t &a)
 
 spuc_int (const uint32_t &a)
 
 spuc_int (const uint64_t &a)
 
template<int I_1>
 spuc_int (const spuc_int< I_1 > &a)
 from another spuc_int<> More...
 
val_type getVal () const
 
void from_int (int64_t x)
 Conversions. More...
 
double to_double (void) const
 
int64_t to_int (void) const
 
bool operator! () const
 
 operator int64_t () const
 
spuc_intoperator++ ()
 
spuc_int operator++ (int)
 
spuc_intoperator-- ()
 
spuc_int operator-- (int)
 
spuc_intoperator= (const spuc_int &a)
 
template<int I_1>
spuc_int< I_ > & operator= (const spuc_int< I_1 > &a)
 
spuc_int< I_+1 > operator- () const
 sign operator More...
 
spuc_int< I_ > operator+ () const
 
spuc_int operator~ () const
 bit flip More...
 
spuc_intoperator= (const int8_t &a)
 
spuc_intoperator= (const int16_t &a)
 
spuc_intoperator= (const int32_t &a)
 
spuc_intoperator= (const int64_t &a)
 
spuc_intoperator= (const uint8_t &a)
 
spuc_intoperator= (const uint16_t &a)
 
spuc_intoperator= (const uint32_t &a)
 
spuc_intoperator= (const uint64_t &a)
 
spuc_intoperator= (const double &a)
 
template<int I_1>
spuc_intoperator+= (const spuc_int< I_1 > &a)
 
template<int I_1>
spuc_intoperator-= (const spuc_int< I_1 > &a)
 
template<int I_1>
spuc_intoperator*= (const spuc_int< I_1 > &b)
 
spuc_intoperator+= (const int8_t &b)
 
spuc_intoperator-= (const int8_t &b)
 
spuc_intoperator*= (const int8_t &b)
 
spuc_intoperator/= (const int8_t &b)
 
spuc_intoperator+= (const int16_t &b)
 
spuc_intoperator-= (const int16_t &b)
 
spuc_intoperator*= (const int16_t &b)
 
spuc_intoperator/= (const int16_t &b)
 
spuc_intoperator+= (const int32_t &b)
 
spuc_intoperator-= (const int32_t &b)
 
spuc_intoperator*= (const int32_t &b)
 
spuc_intoperator/= (const int32_t &b)
 
spuc_intoperator+= (const int64_t &b)
 
spuc_intoperator-= (const int64_t &b)
 
spuc_intoperator*= (const int64_t &b)
 
spuc_intoperator/= (const int64_t &b)
 
spuc_intoperator+= (const uint8_t &b)
 
spuc_intoperator-= (const uint8_t &b)
 
spuc_intoperator*= (const uint8_t &b)
 
spuc_intoperator/= (const uint8_t &b)
 
spuc_intoperator+= (const uint16_t &b)
 
spuc_intoperator-= (const uint16_t &b)
 
spuc_intoperator*= (const uint16_t &b)
 
spuc_intoperator/= (const uint16_t &b)
 
spuc_intoperator+= (const uint32_t &b)
 
spuc_intoperator-= (const uint32_t &b)
 
spuc_intoperator*= (const uint32_t &b)
 
spuc_intoperator/= (const uint32_t &b)
 
spuc_intoperator+= (const uint64_t &b)
 
spuc_intoperator-= (const uint64_t &b)
 
spuc_intoperator*= (const uint64_t &b)
 
spuc_intoperator/= (const uint64_t &b)
 
spuc_intoperator*= (const double &a)
 
spuc_intoperator/= (const double &a)
 
spuc_intoperator+= (const double &a)
 
spuc_intoperator-= (const double &a)
 
spuc_intoperator>>= (const int &a)
 
spuc_intoperator<<= (const int &a)
 
template<typename T >
spuc_intoperator&= (const T &l)
 
template<typename T >
spuc_intoperator|= (const T &l)
 
template<typename T >
spuc_intoperator^= (const T &l)
 
void print (std::ostream &os=::std::cout) const
 

Public Attributes

val_type val
 

Static Public Attributes

static const int INTEGER_BITS = I_
 

Detailed Description

template<int I_>
class SPUC::spuc_int< I_ >

A faster version of the older systemc spuc_int.

Member Typedef Documentation

template<int I_>
typedef int64_t SPUC::spuc_int< I_ >::max_val_type
template<int I_>
typedef int_type_size<NEXT_INT_SIZE<I_>::val>::int_type SPUC::spuc_int< I_ >::val_type

Constructor & Destructor Documentation

template<int I_>
SPUC::spuc_int< I_ >::spuc_int ( )
inline

constructors

Referenced by SPUC::spuc_int< I_ >::operator=().

template<int I_>
SPUC::spuc_int< I_ >::spuc_int ( const spuc_int< I_ > &  a)
inline

From exact same type - just copy val.

template<int I_>
SPUC::spuc_int< I_ >::spuc_int ( const double &  a)
inline
template<int I_>
SPUC::spuc_int< I_ >::spuc_int ( const int8_t &  a)
inline
template<int I_>
SPUC::spuc_int< I_ >::spuc_int ( const int16_t &  a)
inline
template<int I_>
SPUC::spuc_int< I_ >::spuc_int ( const int32_t &  a)
inline
template<int I_>
SPUC::spuc_int< I_ >::spuc_int ( const int64_t &  a)
inline
template<int I_>
SPUC::spuc_int< I_ >::spuc_int ( const uint8_t &  a)
inline
template<int I_>
SPUC::spuc_int< I_ >::spuc_int ( const uint16_t &  a)
inline
template<int I_>
SPUC::spuc_int< I_ >::spuc_int ( const uint32_t &  a)
inline
template<int I_>
SPUC::spuc_int< I_ >::spuc_int ( const uint64_t &  a)
inline
template<int I_>
template<int I_1>
SPUC::spuc_int< I_ >::spuc_int ( const spuc_int< I_1 > &  a)
inline

from another spuc_int<>

References SPUC::spuc_int< I_ >::val.

Member Function Documentation

template<int I_>
void SPUC::spuc_int< I_ >::from_int ( int64_t  x)
inline

Conversions.

template<int I_>
val_type SPUC::spuc_int< I_ >::getVal ( ) const
inline
template<int I_>
SPUC::spuc_int< I_ >::operator int64_t ( ) const
inline
template<int I_>
bool SPUC::spuc_int< I_ >::operator! ( ) const
inline
template<int I_>
template<typename T >
spuc_int& SPUC::spuc_int< I_ >::operator&= ( const T &  l)
inline
template<int I_>
template<int I_1>
spuc_int& SPUC::spuc_int< I_ >::operator*= ( const spuc_int< I_1 > &  b)
inline
template<int I_>
spuc_int& SPUC::spuc_int< I_ >::operator*= ( const int8_t &  b)
inline
template<int I_>
spuc_int& SPUC::spuc_int< I_ >::operator*= ( const int16_t &  b)
inline
template<int I_>
spuc_int& SPUC::spuc_int< I_ >::operator*= ( const int32_t &  b)
inline
template<int I_>
spuc_int& SPUC::spuc_int< I_ >::operator*= ( const int64_t &  b)
inline
template<int I_>
spuc_int& SPUC::spuc_int< I_ >::operator*= ( const uint8_t &  b)
inline
template<int I_>
spuc_int& SPUC::spuc_int< I_ >::operator*= ( const uint16_t &  b)
inline
template<int I_>
spuc_int& SPUC::spuc_int< I_ >::operator*= ( const uint32_t &  b)
inline
template<int I_>
spuc_int& SPUC::spuc_int< I_ >::operator*= ( const uint64_t &  b)
inline
template<int I_>
spuc_int& SPUC::spuc_int< I_ >::operator*= ( const double &  a)
inline

References SPUC::spuc_int< I_ >::getVal().

Here is the call graph for this function:

template<int I_>
spuc_int<I_> SPUC::spuc_int< I_ >::operator+ ( ) const
inline
template<int I_>
spuc_int& SPUC::spuc_int< I_ >::operator++ ( )
inline
template<int I_>
spuc_int SPUC::spuc_int< I_ >::operator++ ( int  )
inline
template<int I_>
template<int I_1>
spuc_int& SPUC::spuc_int< I_ >::operator+= ( const spuc_int< I_1 > &  a)
inline
template<int I_>
spuc_int& SPUC::spuc_int< I_ >::operator+= ( const int8_t &  b)
inline
template<int I_>
spuc_int& SPUC::spuc_int< I_ >::operator+= ( const int16_t &  b)
inline
template<int I_>
spuc_int& SPUC::spuc_int< I_ >::operator+= ( const int32_t &  b)
inline
template<int I_>
spuc_int& SPUC::spuc_int< I_ >::operator+= ( const int64_t &  b)
inline
template<int I_>
spuc_int& SPUC::spuc_int< I_ >::operator+= ( const uint8_t &  b)
inline
template<int I_>
spuc_int& SPUC::spuc_int< I_ >::operator+= ( const uint16_t &  b)
inline
template<int I_>
spuc_int& SPUC::spuc_int< I_ >::operator+= ( const uint32_t &  b)
inline
template<int I_>
spuc_int& SPUC::spuc_int< I_ >::operator+= ( const uint64_t &  b)
inline
template<int I_>
spuc_int& SPUC::spuc_int< I_ >::operator+= ( const double &  a)
inline

References SPUC::spuc_int< I_ >::getVal().

Here is the call graph for this function:

template<int I_>
spuc_int<I_ + 1> SPUC::spuc_int< I_ >::operator- ( ) const
inline

sign operator

References SPUC::spuc_int< I_ >::val.

template<int I_>
spuc_int& SPUC::spuc_int< I_ >::operator-- ( )
inline
template<int I_>
spuc_int SPUC::spuc_int< I_ >::operator-- ( int  )
inline
template<int I_>
template<int I_1>
spuc_int& SPUC::spuc_int< I_ >::operator-= ( const spuc_int< I_1 > &  a)
inline
template<int I_>
spuc_int& SPUC::spuc_int< I_ >::operator-= ( const int8_t &  b)
inline
template<int I_>
spuc_int& SPUC::spuc_int< I_ >::operator-= ( const int16_t &  b)
inline
template<int I_>
spuc_int& SPUC::spuc_int< I_ >::operator-= ( const int32_t &  b)
inline
template<int I_>
spuc_int& SPUC::spuc_int< I_ >::operator-= ( const int64_t &  b)
inline
template<int I_>
spuc_int& SPUC::spuc_int< I_ >::operator-= ( const uint8_t &  b)
inline
template<int I_>
spuc_int& SPUC::spuc_int< I_ >::operator-= ( const uint16_t &  b)
inline
template<int I_>
spuc_int& SPUC::spuc_int< I_ >::operator-= ( const uint32_t &  b)
inline
template<int I_>
spuc_int& SPUC::spuc_int< I_ >::operator-= ( const uint64_t &  b)
inline
template<int I_>
spuc_int& SPUC::spuc_int< I_ >::operator-= ( const double &  a)
inline

References SPUC::spuc_int< I_ >::getVal().

Here is the call graph for this function:

template<int I_>
spuc_int& SPUC::spuc_int< I_ >::operator/= ( const int8_t &  b)
inline
template<int I_>
spuc_int& SPUC::spuc_int< I_ >::operator/= ( const int16_t &  b)
inline
template<int I_>
spuc_int& SPUC::spuc_int< I_ >::operator/= ( const int32_t &  b)
inline
template<int I_>
spuc_int& SPUC::spuc_int< I_ >::operator/= ( const int64_t &  b)
inline
template<int I_>
spuc_int& SPUC::spuc_int< I_ >::operator/= ( const uint8_t &  b)
inline
template<int I_>
spuc_int& SPUC::spuc_int< I_ >::operator/= ( const uint16_t &  b)
inline
template<int I_>
spuc_int& SPUC::spuc_int< I_ >::operator/= ( const uint32_t &  b)
inline
template<int I_>
spuc_int& SPUC::spuc_int< I_ >::operator/= ( const uint64_t &  b)
inline
template<int I_>
spuc_int& SPUC::spuc_int< I_ >::operator/= ( const double &  a)
inline

References SPUC::spuc_int< I_ >::getVal().

Here is the call graph for this function:

template<int I_>
spuc_int& SPUC::spuc_int< I_ >::operator<<= ( const int &  a)
inline
template<int I_>
spuc_int& SPUC::spuc_int< I_ >::operator= ( const spuc_int< I_ > &  a)
inline

References SPUC::spuc_int< I_ >::getVal().

Here is the call graph for this function:

template<int I_>
template<int I_1>
spuc_int<I_>& SPUC::spuc_int< I_ >::operator= ( const spuc_int< I_1 > &  a)
inline

assignment operator from another size, use copy constructor, then copy val;

References SPUC::spuc_int< I_ >::getVal().

Here is the call graph for this function:

template<int I_>
spuc_int& SPUC::spuc_int< I_ >::operator= ( const int8_t &  a)
inline

References SPUC::spuc_int< I_ >::spuc_int().

Here is the call graph for this function:

template<int I_>
spuc_int& SPUC::spuc_int< I_ >::operator= ( const int16_t &  a)
inline

References SPUC::spuc_int< I_ >::spuc_int().

Here is the call graph for this function:

template<int I_>
spuc_int& SPUC::spuc_int< I_ >::operator= ( const int32_t &  a)
inline

References SPUC::spuc_int< I_ >::spuc_int().

Here is the call graph for this function:

template<int I_>
spuc_int& SPUC::spuc_int< I_ >::operator= ( const int64_t &  a)
inline

References SPUC::spuc_int< I_ >::spuc_int().

Here is the call graph for this function:

template<int I_>
spuc_int& SPUC::spuc_int< I_ >::operator= ( const uint8_t &  a)
inline

References SPUC::spuc_int< I_ >::spuc_int().

Here is the call graph for this function:

template<int I_>
spuc_int& SPUC::spuc_int< I_ >::operator= ( const uint16_t &  a)
inline

References SPUC::spuc_int< I_ >::spuc_int().

Here is the call graph for this function:

template<int I_>
spuc_int& SPUC::spuc_int< I_ >::operator= ( const uint32_t &  a)
inline

References SPUC::spuc_int< I_ >::spuc_int().

Here is the call graph for this function:

template<int I_>
spuc_int& SPUC::spuc_int< I_ >::operator= ( const uint64_t &  a)
inline

References SPUC::spuc_int< I_ >::spuc_int().

Here is the call graph for this function:

template<int I_>
spuc_int& SPUC::spuc_int< I_ >::operator= ( const double &  a)
inline

References SPUC::spuc_int< I_ >::spuc_int().

Here is the call graph for this function:

template<int I_>
spuc_int& SPUC::spuc_int< I_ >::operator>>= ( const int &  a)
inline
template<int I_>
template<typename T >
spuc_int& SPUC::spuc_int< I_ >::operator^= ( const T &  l)
inline
template<int I_>
template<typename T >
spuc_int& SPUC::spuc_int< I_ >::operator|= ( const T &  l)
inline
template<int I_>
spuc_int SPUC::spuc_int< I_ >::operator~ ( void  ) const
inline

bit flip

References SPUC::spuc_int< I_ >::val.

template<int I_>
void SPUC::spuc_int< I_ >::print ( std::ostream &  os = ::std::cout) const
inline

References SPUC::spuc_int< I_ >::to_int().

Here is the call graph for this function:

template<int I_>
double SPUC::spuc_int< I_ >::to_double ( void  ) const
inline
template<int I_>
int64_t SPUC::spuc_int< I_ >::to_int ( void  ) const
inline

Member Data Documentation

template<int I_>
const int SPUC::spuc_int< I_ >::INTEGER_BITS = I_
static
template<int I_>
val_type SPUC::spuc_int< I_ >::val

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