51#ifndef __SYSTEMC_EXT_DT_FX_SCFX_MANT_HH__
52#define __SYSTEMC_EXT_DT_FX_SCFX_MANT_HH__
104 static void free(
word *, std::size_t);
118#if defined(SC_BOOST_BIG_ENDIAN )
120#elif defined(SC_BOOST_LITTLE_ENDIAN)
128#if defined(SC_BOOST_BIG_ENDIAN)
130#elif defined(SC_BOOST_LITTLE_ENDIAN)
139#if defined(SC_BOOST_BIG_ENDIAN)
141#elif defined(SC_BOOST_LITTLE_ENDIAN)
150#if defined(SC_BOOST_BIG_ENDIAN)
152#elif defined(SC_BOOST_LITTLE_ENDIAN)
163 m_array(0), m_size(rhs.m_size)
166 for (
int i = 0; i <
m_size; i++) {
180 for (
int i = 0; i <
m_size; i++) {
197 for (
int i = 0; i <
m_size; i++) {
217 for (
int i = 0; i <
size; i++) {
219#if defined(SC_BOOST_BIG_ENDIAN)
221#elif defined(SC_BOOST_LITTLE_ENDIAN)
225#if defined(SC_BOOST_BIG_ENDIAN)
227#elif defined(SC_BOOST_LITTLE_ENDIAN)
233 for (
int i = 0; i <
size; i++) {
235#if defined(SC_BOOST_BIG_ENDIAN)
237#elif defined(SC_BOOST_LITTLE_ENDIAN)
241#if defined(SC_BOOST_BIG_ENDIAN)
242 p[-
size + 1 + i] = 0;
243#elif defined(SC_BOOST_LITTLE_ENDIAN)
261 "mantissa index out of range");
262#if defined(SC_BOOST_BIG_ENDIAN)
264#elif defined(SC_BOOST_LITTLE_ENDIAN )
273 "mantissa index out of range" );
274#if defined(SC_BOOST_BIG_ENDIAN)
276#elif defined(SC_BOOST_LITTLE_ENDIAN)
285#if defined(SC_BOOST_BIG_ENDIAN)
287#elif defined(SC_BOOST_LITTLE_ENDIAN)
299 for (
int i = 0; i < size; i++) {
300 target[i] = ~source[i];
311 for (
int i = 0; i < mant.
size(); i++) {
349 void *
operator new(std::size_t sz) { return ::operator
new (sz); }
366 m_mant(const_cast<
scfx_mant *>(& mant)), m_not_const(false)
370 m_mant(mant), m_not_const(true)
scfx_mant_ref & operator=(const scfx_mant &)
scfx_mant_ref(const scfx_mant_ref &)
scfx_mant & operator=(const scfx_mant &)
word operator[](int) const
static word * alloc_word(std::size_t size)
half_word half_at(int) const
half_word * half_addr(int=0) const
static word * alloc(std::size_t)
static void free(word *, std::size_t)
static void free_word(word *array, std::size_t size)
void resize_to(int, int=0)
void complement(scfx_mant &target, const scfx_mant &source, int size)
const T sc_min(const T &a, const T &b)
void inc(scfx_mant &mant)
#define SC_ASSERT_(cnd, msg)