#include <scalar_bigunsigned.hpp>
Definition at line 11 of file scalar_bigunsigned.hpp.
typedef unsigned hdwi_t |
Definition at line 14 of file scalar_bigunsigned.hpp.
typedef unsigned hi |
Definition at line 13 of file scalar_bigunsigned.hpp.
bigunsigned | ( | ) | [inline] |
Definition at line 18 of file scalar_bigunsigned.hpp.
Referenced by bigunsigned< N >::operator=().
bigunsigned | ( | unsigned | n | ) | [inline] |
Definition at line 20 of file scalar_bigunsigned.hpp.
References bigunsigned< N >::data, and mmx::N().
const bigunsigned<N-1>& next | ( | ) | const [inline] |
Definition at line 124 of file scalar_bigunsigned.hpp.
References bigunsigned< N >::data, and mmx::N().
00125 { 00126 return *((const bigunsigned<N-1>*)(this->data+1)); 00127 };
bigunsigned<N-1>& next | ( | ) | [inline] |
Definition at line 119 of file scalar_bigunsigned.hpp.
References bigunsigned< N >::data, and mmx::N().
Referenced by mmx::add().
00120 { 00121 return *((bigunsigned<N-1>*)(this->data+1)); 00122 };
bigunsigned& operator+= | ( | const bigunsigned< N > & | a | ) | [inline] |
Definition at line 135 of file scalar_bigunsigned.hpp.
References mmx::add().
00136 { 00137 add(*this,a); 00138 return *this; 00139 };
bigunsigned& operator+= | ( | unsigned | n | ) | [inline] |
Definition at line 129 of file scalar_bigunsigned.hpp.
References mmx::add().
00130 { 00131 add(*this,n); 00132 return *this; 00133 };
bool operator< | ( | const bigunsigned< N > & | bi | ) | [inline] |
Definition at line 36 of file scalar_bigunsigned.hpp.
References bigunsigned< N >::data, and mmx::N().
bigunsigned& operator<<= | ( | unsigned | n | ) | [inline] |
Definition at line 57 of file scalar_bigunsigned.hpp.
References bigunsigned< N >::data, and mmx::N().
00058 { 00059 if ( n >= numerics::hdwi<hi>::nbit ) 00060 { 00061 do 00062 { 00063 for ( unsigned i = N-1; i > 0; i -- ) 00064 data[i] = data[i-1]; 00065 data[0] = 0; 00066 n -= numerics::hdwi<hi>::nbit; 00067 } 00068 while ( n >= numerics::hdwi<hi>::nbit ); 00069 }; 00070 if ( n ) 00071 { 00072 data[N-1] <<= n; 00073 for ( int i = N-1; i > 0; i -- ) 00074 { 00075 data[i] |= (data[i-1]>>(numerics::hdwi<hi>::nbit-n)); 00076 data[i-1] <<= n; 00077 }; 00078 }; 00079 return *this; 00080 };
bigunsigned& operator= | ( | const bigunsigned< N > & | b | ) | [inline] |
Definition at line 31 of file scalar_bigunsigned.hpp.
References bigunsigned< N >::bigunsigned().
00032 { 00033 new (this) bigunsigned(b); return *this; 00034 };
bigunsigned& operator= | ( | unsigned | n | ) | [inline] |
Definition at line 26 of file scalar_bigunsigned.hpp.
References bigunsigned< N >::bigunsigned().
00027 { 00028 new (this) bigunsigned(n); return *this; 00029 };
bool operator== | ( | const bigunsigned< N > & | bi | ) | [inline] |
Definition at line 50 of file scalar_bigunsigned.hpp.
References bigunsigned< N >::data, and mmx::N().
bool operator> | ( | const bigunsigned< N > & | bi | ) | [inline] |
Definition at line 43 of file scalar_bigunsigned.hpp.
References bigunsigned< N >::data, and mmx::N().
bigunsigned& operator>>= | ( | unsigned | n | ) | [inline] |
Definition at line 82 of file scalar_bigunsigned.hpp.
References bigunsigned< N >::data, and mmx::N().
00083 { 00084 if ( n >= numerics::hdwi<hi>::nbit ) 00085 { 00086 do 00087 { 00088 for ( unsigned i = 0; i < N-1; data[i] = data[i+1], i ++ ) ; 00089 data[N-1] = 0; 00090 n -= numerics::hdwi<hi>::nbit; 00091 } 00092 while ( n >= numerics::hdwi<hi>::nbit ); 00093 }; 00094 00095 if ( n ) 00096 { 00097 data[0] >>= n; 00098 for ( int i = 0; i < int(N-1); i ++ ) 00099 { 00100 data[i] |= (data[i+1]<<(numerics::hdwi<hi>::nbit-n)); 00101 data[i+1] >>= n; 00102 }; 00103 }; 00104 return *this; 00105 };
unsigned operator[] | ( | int | i | ) | const [inline] |
Definition at line 146 of file scalar_bigunsigned.hpp.
References bigunsigned< N >::data.
00147 { 00148 return data[i]; 00149 };
unsigned& operator[] | ( | int | i | ) | [inline] |
Definition at line 141 of file scalar_bigunsigned.hpp.
References bigunsigned< N >::data.
00142 { 00143 return data[i]; 00144 };
bigunsigned& operator|= | ( | const bigunsigned< N > & | bu | ) | [inline] |
Definition at line 113 of file scalar_bigunsigned.hpp.
References bigunsigned< N >::data, and mmx::N().
bigunsigned& operator|= | ( | unsigned | n | ) | [inline] |
Definition at line 107 of file scalar_bigunsigned.hpp.
References bigunsigned< N >::data.
00108 { 00109 data[0] |= n; 00110 return *this; 00111 };
Definition at line 17 of file scalar_bigunsigned.hpp.
Referenced by bigunsigned< N >::bigunsigned(), bigunsigned< N >::next(), bigunsigned< N >::operator<(), bigunsigned< N >::operator<<=(), bigunsigned< N >::operator==(), bigunsigned< N >::operator>(), bigunsigned< N >::operator>>=(), bigunsigned< N >::operator[](), and bigunsigned< N >::operator|=().
bool s_overflow = false [inline, static] |
Definition at line 15 of file scalar_bigunsigned.hpp.