Main Page | Class Hierarchy | Alphabetical List | Data Structures | File List | Data Fields | Globals

MRAmpEncode Class Reference

#include <MRAmpEncode.h>

Collaboration diagram for MRAmpEncode:

Collaboration graph
[legend]

Public Member Functions

int array_dim ()
int bplen_a (int d)
intbplen_a ()
int bplen_coef ()
int bplen_mpsizeb ()
int bplen_n (int d)
intbplen_n ()
MRAmpEncodecopy (const MRAmpEncode &)
int grid_dim ()
bool is_equal (const MRAmpEncode &)
bool is_null ()
 MRAmpEncode (int grid_dim, int array_dim, int bplen_mpsizeb, int bplen_coef, const int *bplen_n, const int *bplen_a)
 MRAmpEncode (int grid_dim, int array_dim=0, int bplen_mpsizeb=0, int bplen_coef=0, int bplen_n=0, int bplen_a=0)
 MRAmpEncode (const MRAmpEncode &)
 MRAmpEncode ()
bool operator! ()
bool operator!= (const MRAmpEncode &)
MRAmpEncodeoperator() (int grid_dim, int array_dim, int bplen_mpsizeb, int bplen_coef, const int *bplen_n, const int *bplen_a)
MRAmpEncodeoperator() (int grid_dim, int array_dim=0, int bplen_mpsizeb=0, int bplen_coef=0, int bplen_n=0, int bplen_a=0)
MRAmpEncodeoperator() (const MRAmpEncode &)
MRAmpEncodeoperator() ()
MRAmpEncodeoperator<< (istream &)
MRAmpEncodeoperator<< (BufferBase &)
MRAmpEncodeoperator= (const MRAmpEncode &)
bool operator== (const MRAmpEncode &)
MRAmpEncodeoperator>> (ostream &)
MRAmpEncodeoperator>> (BufferBase &)
void read (ostream &)
void read (BufferBase &)
void report (ostream &=cout)
MRAmpEncodeset_null ()
virtual int sizeb ()
void write (istream &)
void write (BufferBase &)

Protected Attributes

int _array_dim
int _bplen_a [MRA_MAXDIM]
int _bplen_coef
int _bplen_mpsizeb
int _bplen_n [MRA_MAXDIM]
int _grid_dim

Private Member Functions

void synchronize ()

Friends

class MRAsbEncode
ostream & operator<< (ostream &, MRAmpEncode &)
BufferBaseoperator<< (BufferBase &, MRAmpEncode &)
istream & operator>> (istream &, MRAmpEncode &)
BufferBaseoperator>> (BufferBase &, MRAmpEncode &)

Constructor & Destructor Documentation

MRAmpEncode::MRAmpEncode  ) 
 

Definition at line 114 of file MRAmpEncode.h.

References set_null().

00114 { set_null(); } 

MRAmpEncode::MRAmpEncode const MRAmpEncode  ) 
 

Definition at line 117 of file MRAmpEncode.h.

References _bplen_a, and _bplen_n.

00118   : _grid_dim(mpenc._grid_dim), _array_dim(mpenc._array_dim), 
00119     _bplen_mpsizeb(mpenc._bplen_mpsizeb), _bplen_coef(mpenc._bplen_coef)
00120 {
00121    for( int d = 0; d < _grid_dim; ++d ) _bplen_n[d] = mpenc._bplen_n[d];
00122    for( int d = 0; d < _array_dim; ++d ) _bplen_a[d] = mpenc._bplen_a[d];
00123 }

MRAmpEncode::MRAmpEncode int  grid_dim,
int  array_dim = 0,
int  bplen_mpsizeb = 0,
int  bplen_coef = 0,
int  bplen_n = 0,
int  bplen_a = 0
 

Definition at line 126 of file MRAmpEncode.h.

00131   : _grid_dim(grid_dim), _array_dim(array_dim), 
00132     _bplen_mpsizeb(bplen_mpsizeb), _bplen_coef(bplen_coef)
00133 {
00134    for( int d = 0; d < _grid_dim; ++d ) _bplen_n[d] = bplen_n;
00135    for( int d = 0; d < _array_dim; ++d ) _bplen_a[d] = bplen_a;
00136 }

MRAmpEncode::MRAmpEncode int  grid_dim,
int  array_dim,
int  bplen_mpsizeb,
int  bplen_coef,
const int bplen_n,
const int bplen_a
 

Definition at line 139 of file MRAmpEncode.h.

00144   : _grid_dim(grid_dim), _array_dim(array_dim), 
00145     _bplen_mpsizeb(bplen_mpsizeb), _bplen_coef(bplen_coef)
00146 {
00147    for( int d = 0; d < _grid_dim; ++d ) _bplen_n[d] = bplen_n[d];
00148    for( int d = 0; d < _array_dim; ++d ) _bplen_a[d] = bplen_a[d];
00149 }


Member Function Documentation

int MRAmpEncode::array_dim  ) 
 

Definition at line 356 of file MRAmpEncode.h.

Referenced by MRAmpBase.append(), MRAmpBase.iterator.operator *(), MRAmpBase.iterator.operator++(), report(), and sizeb().

00356 { return _array_dim; }

int MRAmpEncode::bplen_a int  d  ) 
 

Definition at line 368 of file MRAmpEncode.h.

00368 { return _bplen_a[d]; }

int* MRAmpEncode.bplen_a  ) 
 

Referenced by MRAmpBase.acoefsizeb(), MRAmpBase.append(), MRAmpBase.iterator.operator *(), MRAmpBase.iterator.operator++(), and report().

int MRAmpEncode::bplen_coef  ) 
 

Definition at line 362 of file MRAmpEncode.h.

Referenced by MRAmpBase.acoefsizeb(), MRAmpBase.append(), MRAmpBase.iterator.operator *(), MRAmpBase.iterator.operator++(), and report().

00362 { return _bplen_coef; }

int MRAmpEncode::bplen_mpsizeb  ) 
 

Definition at line 359 of file MRAmpEncode.h.

Referenced by MRAsbObject.cstattable_sbsizeb(), MRAsbBase.end(), MRAmpBase.end(), MRAmpBase.fix_hdr(), MRAmpBase.fix_mp(), MRAmpBase.hdrsizeb(), MRAmpBase.is_empty(), MRAmpBase.nullsizeb(), MRAmpBase.read(), MRAmpBase.refix_hdr(), report(), MRAmpBase.set_empty(), MRAmpBase.synchronize(), MRAmpBase.unfix_mp(), and MRAmpBase.write().

00359 { return _bplen_mpsizeb; }

int MRAmpEncode::bplen_n int  d  ) 
 

Definition at line 365 of file MRAmpEncode.h.

00365 { return _bplen_n[d]; }

int* MRAmpEncode.bplen_n  ) 
 

Referenced by MRAmpBase.fix_hdr(), MRAmpBase.hdrsizeb(), MRAmpBase.refix_hdr(), report(), and MRAmpBase.synchronize().

MRAmpEncode & MRAmpEncode::copy const MRAmpEncode  ) 
 

Definition at line 152 of file MRAmpEncode.h.

References _array_dim, _bplen_a, _bplen_coef, _bplen_mpsizeb, _bplen_n, and _grid_dim.

Referenced by operator()(), and operator=().

00153 {
00154    if ( this != &mpenc ) {
00155       _grid_dim = mpenc._grid_dim;
00156       _array_dim = mpenc._array_dim;
00157       _bplen_mpsizeb = mpenc._bplen_mpsizeb;
00158       _bplen_coef = mpenc._bplen_coef;
00159       for( int d = 0; d < _grid_dim; ++d ) _bplen_n[d] = mpenc._bplen_n[d];
00160       for( int d = 0; d < _array_dim; ++d ) _bplen_a[d] = mpenc._bplen_a[d];
00161    }
00162    return *this;
00163 }

int MRAmpEncode::grid_dim  ) 
 

Definition at line 353 of file MRAmpEncode.h.

Referenced by MRAmpBase.acoefsizeb(), MRAsbBase.append(), MRAsbBase.copy(), MRAmpBase.copy(), MRAmpBase.fix_hdr(), MRAmpBase.hdrsizeb(), MRAmpBase.is_equal(), MRAsbBase.mmatch(), MRAsbObject.mpart(), MRAmpBase.MRAmpBase(), MRAsbObject.MRAsbObject(), MRAsbObject.mstattable_sbsizeb(), MRAsbObject.operator()(), MRAsbBase.operator()(), MRAmpBase.operator()(), MRAmpBase.refix_hdr(), report(), MRAmpBase.report(), MRAmpBase.set_mcode(), MRAsbObject.set_mpart(), MRAmpBase.set_n(), sizeb(), and MRAmpBase.synchronize().

00353 { return _grid_dim; }

bool MRAmpEncode::is_equal const MRAmpEncode  ) 
 

Definition at line 213 of file MRAmpEncode.h.

References _array_dim, _bplen_a, _bplen_coef, _bplen_mpsizeb, _bplen_n, and _grid_dim.

Referenced by operator!=(), and operator==().

00216 {
00217    if ( this != &mpenc ) {
00218       if ( _grid_dim != mpenc._grid_dim ) return false;
00219       if ( _array_dim != mpenc._array_dim ) return false;
00220       if ( _bplen_mpsizeb != mpenc._bplen_mpsizeb ) return false;
00221       if ( _bplen_coef != mpenc._bplen_coef ) return false;
00222       for( int d = 0; d < _grid_dim; ++d ) 
00223          if ( _bplen_n[d] != mpenc._bplen_n[d] ) return false;
00224       for( int d = 0; d < _array_dim; ++d ) 
00225          if ( _bplen_a[d] != mpenc._bplen_a[d] ) return false;
00226    } 
00227    return true;
00228 }

bool MRAmpEncode::is_null  ) 
 

Definition at line 253 of file MRAmpEncode.h.

Referenced by operator!().

00253 { return ( _grid_dim == 0); }

bool MRAmpEncode::operator!  ) 
 

Definition at line 256 of file MRAmpEncode.h.

References is_null().

00256 { return is_null(); }

bool MRAmpEncode::operator!= const MRAmpEncode  ) 
 

Definition at line 237 of file MRAmpEncode.h.

References is_equal().

00238 { 
00239    return !is_equal(rhs); 
00240 }

MRAmpEncode & MRAmpEncode::operator() int  grid_dim,
int  array_dim,
int  bplen_mpsizeb,
int  bplen_coef,
const int bplen_n,
const int bplen_a
 

Definition at line 197 of file MRAmpEncode.h.

00202 {
00203    _grid_dim = grid_dim;
00204    _array_dim = array_dim;
00205    _bplen_mpsizeb = bplen_mpsizeb;
00206    _bplen_coef = bplen_coef;
00207    for( int d = 0; d < _grid_dim; ++d ) _bplen_n[d] = bplen_n[d];
00208    for( int d = 0; d < _array_dim; ++d ) _bplen_a[d] = bplen_a[d];
00209    return *this;
00210 }

MRAmpEncode & MRAmpEncode::operator() int  grid_dim,
int  array_dim = 0,
int  bplen_mpsizeb = 0,
int  bplen_coef = 0,
int  bplen_n = 0,
int  bplen_a = 0
 

Definition at line 181 of file MRAmpEncode.h.

00186 {
00187    _grid_dim = grid_dim;
00188    _array_dim = array_dim;
00189    _bplen_mpsizeb = bplen_mpsizeb;
00190    _bplen_coef = bplen_coef;
00191    for( int d = 0; d < _grid_dim; ++d ) _bplen_n[d] = bplen_n;
00192    for( int d = 0; d < _array_dim; ++d ) _bplen_a[d] = bplen_a;
00193    return *this;
00194 }

MRAmpEncode & MRAmpEncode::operator() const MRAmpEncode  ) 
 

Definition at line 175 of file MRAmpEncode.h.

References copy().

00176 { 
00177    return copy(mpenc);
00178 }

MRAmpEncode & MRAmpEncode::operator()  ) 
 

Definition at line 172 of file MRAmpEncode.h.

References set_null().

00172 { return set_null(); }

MRAmpEncode & MRAmpEncode::operator<< istream &   ) 
 

Definition at line 323 of file MRAmpEncode.h.

References write().

00324 {
00325    write(is);
00326    return *this;
00327 }

MRAmpEncode & MRAmpEncode::operator<< BufferBase  ) 
 

Definition at line 276 of file MRAmpEncode.h.

References write().

00277 {
00278    write(buffer);
00279    return *this;
00280 }

MRAmpEncode & MRAmpEncode::operator= const MRAmpEncode  ) 
 

Definition at line 166 of file MRAmpEncode.h.

References copy().

00167 {
00168    return copy(rhs); 
00169 }

bool MRAmpEncode::operator== const MRAmpEncode  ) 
 

Definition at line 231 of file MRAmpEncode.h.

References is_equal().

00232 { 
00233    return is_equal(rhs); 
00234 }

MRAmpEncode & MRAmpEncode::operator>> ostream &   ) 
 

Definition at line 346 of file MRAmpEncode.h.

References read().

00347 {
00348    read(os);
00349    return *this;
00350 }

MRAmpEncode & MRAmpEncode::operator>> BufferBase  ) 
 

Definition at line 299 of file MRAmpEncode.h.

References read().

00300 {
00301    read(buffer);
00302    return *this;
00303 }

void MRAmpEncode::read ostream &   ) 
 

Definition at line 330 of file MRAmpEncode.h.

00331 {
00332    bytepack bp;
00333    os << bp( _grid_dim, 1 );
00334    os << bp( _array_dim, 1 );
00335    os << bp( _bplen_mpsizeb, 1 );
00336    os << bp( _bplen_coef, 1 );
00337    for( int d = 0; d < _grid_dim; ++d ) {
00338       os << bp( _bplen_n[d], 1 );
00339    }
00340    for( int d = 0; d < _array_dim; ++d ) {
00341       os << bp( _bplen_a[d], 1 );
00342    }
00343 }

void MRAmpEncode::read BufferBase  ) 
 

Definition at line 283 of file MRAmpEncode.h.

Referenced by operator<<(), and operator>>().

00284 {
00285    bytepack bp;
00286    buffer << bp( _grid_dim, 1 );
00287    buffer << bp( _array_dim, 1 );
00288    buffer << bp( _bplen_mpsizeb, 1 );
00289    buffer << bp( _bplen_coef, 1 );
00290    for( int d = 0; d < _grid_dim; ++d ) {
00291       buffer << bp( _bplen_n[d], 1 );
00292    }
00293    for( int d = 0; d < _array_dim; ++d ) {
00294       buffer << bp( _bplen_a[d], 1 );
00295    }
00296 }

void MRAmpEncode::report ostream &  = cout  ) 
 

Definition at line 374 of file MRAmpEncode.h.

References array_dim(), bplen_a(), bplen_coef(), bplen_mpsizeb(), bplen_n(), and grid_dim().

Referenced by MRAmpBase.report().

00375 {
00376    os << "MRAmpEncode::report grid_dim=" << grid_dim() << '\n';
00377    os << "MRAmpEncode::report array_dim=" << array_dim() << '\n';
00378    os << "MRAmpEncode::report bplen_mpsizeb=" 
00379       << bplen_mpsizeb() << '\n';
00380    os << "MRAmpEncode::report bplen_coef=" << bplen_coef() << '\n';
00381    for( int d = 0; d < _grid_dim; ++d ) {
00382       os << "MRAmpEncode::report bplen_n[" << d << "]=" 
00383          << bplen_n(d) << '\n';
00384    }
00385    for( int d = 0; d < _array_dim; ++d ) {
00386       os << "MRAmpEncode::report bplen_a[" << d << "]=" 
00387          << bplen_a(d) << '\n';
00388    }
00389 }

MRAmpEncode & MRAmpEncode::set_null  ) 
 

Definition at line 243 of file MRAmpEncode.h.

Referenced by MRAmpEncode(), MRAsbObject.MRAsbObject(), operator()(), and MRAsbBase.set_null().

00244 {
00245    _grid_dim = 0;
00246    _array_dim = 0;
00247    _bplen_mpsizeb = 0;
00248    _bplen_coef = 0;
00249    return *this;
00250 }

int MRAmpEncode::sizeb  )  [virtual]
 

Definition at line 371 of file MRAmpEncode.h.

References array_dim(), and grid_dim().

Referenced by MRAsbBase.hdrsizeb().

00371 { return ( 4 + grid_dim() + array_dim() ); }

void MRAmpEncode.synchronize  )  [private]
 

Definition at line 99 of file MRAmpEncode.h.

Referenced by write().

00099 {}

void MRAmpEncode::write istream &   ) 
 

Definition at line 306 of file MRAmpEncode.h.

References synchronize().

00307 {
00308    bytepack bp;
00309    is >> bp(0,1); _grid_dim = int(bp);
00310    is >> bp(0,1); _array_dim = int(bp);
00311    is >> bp(0,1); _bplen_mpsizeb = int(bp);
00312    is >> bp(0,1); _bplen_coef = int(bp);
00313    for( int d = 0; d < _grid_dim; ++d ) {
00314       is >> bp(0,1); _bplen_n[d]= int(bp);
00315    }
00316    for( int d = 0; d < _array_dim; ++d ) {
00317       is >> bp(0,1); _bplen_a[d]= int(bp);
00318    }
00319    synchronize();
00320 }

void MRAmpEncode::write BufferBase  ) 
 

Definition at line 259 of file MRAmpEncode.h.

References synchronize().

Referenced by operator<<(), and operator>>().

00260 {
00261    bytepack bp;
00262    buffer >> bp(0,1); _grid_dim = int(bp);
00263    buffer >> bp(0,1); _array_dim = int(bp);
00264    buffer >> bp(0,1); _bplen_mpsizeb = int(bp);
00265    buffer >> bp(0,1); _bplen_coef = int(bp);
00266    for( int d = 0; d < _grid_dim; ++d ) {
00267       buffer >> bp(0,1); _bplen_n[d]= int(bp);
00268    }
00269    for( int d = 0; d < _array_dim; ++d ) {
00270       buffer >> bp(0,1); _bplen_a[d]= int(bp);
00271    }
00272    synchronize();
00273 }


Friends And Related Function Documentation

friend class MRAsbEncode [friend]
 

Definition at line 101 of file MRAmpEncode.h.

ostream& operator<< ostream &  os,
MRAmpEncode mp
[friend]
 

Definition at line 408 of file MRAmpEncode.h.

00409 {
00410    mp.read(os);
00411    return os;
00412 }

BufferBase& operator<< BufferBase buffer,
MRAmpEncode mp
[friend]
 

Definition at line 394 of file MRAmpEncode.h.

00395 {
00396    mp.read(buffer);
00397    return buffer;
00398 }

istream& operator>> istream &  is,
MRAmpEncode mp
[friend]
 

Definition at line 415 of file MRAmpEncode.h.

00416 {
00417    mp.write(is);
00418    return is;
00419 }

BufferBase& operator>> BufferBase buffer,
MRAmpEncode mp
[friend]
 

Definition at line 401 of file MRAmpEncode.h.

00402 {
00403    mp.write(buffer);
00404    return buffer;
00405 }


Field Documentation

int MRAmpEncode._array_dim [protected]
 

Definition at line 92 of file MRAmpEncode.h.

Referenced by copy(), and is_equal().

int MRAmpEncode._bplen_a[MRA_MAXDIM] [protected]
 

Definition at line 96 of file MRAmpEncode.h.

Referenced by copy(), is_equal(), and MRAmpEncode().

int MRAmpEncode._bplen_coef [protected]
 

Definition at line 94 of file MRAmpEncode.h.

Referenced by copy(), and is_equal().

int MRAmpEncode._bplen_mpsizeb [protected]
 

Definition at line 93 of file MRAmpEncode.h.

Referenced by copy(), and is_equal().

int MRAmpEncode._bplen_n[MRA_MAXDIM] [protected]
 

Definition at line 95 of file MRAmpEncode.h.

Referenced by copy(), is_equal(), and MRAmpEncode().

int MRAmpEncode._grid_dim [protected]
 

Definition at line 91 of file MRAmpEncode.h.

Referenced by copy(), and is_equal().


The documentation for this class was generated from the following file:
Generated on Mon May 31 21:41:28 2004 for SR2k4 Assembler by doxygen 1.3.6