PPL Logo

SRtable Class Reference

A table for storing the number of sends and recvs at a timestamp. More...

#include <srtable.h>

Collaboration diagram for SRtable:

Collaboration graph
[legend]

Public Member Functions

 SRtable ()
 Basic constructor.
 ~SRtable ()
 Destructor.
void pup (PUP::er &p)
 PUP routine.
void Initialize ()
 Initialize table to a minimum size.
void Insert (POSE_TimeType ts, int sr)
 Insert send/recv record sr at timestamp ts.
void Insert (SRentry *e)
 Insert an existing SRentry e.
void Restructure (POSE_TimeType newGVTest, POSE_TimeType firstTS, int firstSR)
 Restructure the table according to new GVT estimate and first send/recv.
void MapToBuckets (SRentry *bkt, SRentry *endBkt, int *s, int *r)
 Move contents of bkt to new bucket structure.
UpdateMsgPackTable (POSE_TimeType pvt, POSE_TimeType *maxSRb)
 Compress and pack table into an UpdateMsg and return it.
void SortTable ()
 CompressAndSort all buckets.
void CompressAndSortBucket (POSE_TimeType i, int is_overflow)
 Compress a bucket so all SRentries have unique timestamps and are sorted.
void FreeTable ()
 Free all buckets and overflows, reset all counts.
void dump ()
 Dump data fields.
char * dumpString ()
 Dump data fields to a string.
void sanitize ()
 Check validity of data fields.
void self_test ()
 Test this class.

Data Fields

POSE_TimeType offset
 Base timestamp to index tables.
int b
 Number of buckets to sort sends/recvs into.
int size_b
 Size of each bucket.
SRentrybuckets [MAX_B]
 The buckets to sort sends/recvs into.
SRentryend_bucket [MAX_B]
 Pointers to the last entry of each bucket.
int sends [MAX_B]
 Error checking on bucket counts.
int recvs [MAX_B]
int ofSends
int ofRecvs
SRentryoverflow
 The overflow bucket.
SRentryend_overflow
 End entry of overflow.
int numEntries [MAX_B]
 Number of distinct timestamp entries per bucket.
int numOverflow
 Number of distinct entries in overflow bucket.

Detailed Description

A table for storing the number of sends and recvs at a timestamp.

This class is used in GVT to keep track of messages sent/received

Definition at line 109 of file srtable.h.


Constructor & Destructor Documentation

SRtable::SRtable (  ) 

Basic constructor.

Initializes all data fields

Definition at line 21 of file srtable.C.

References buckets, end_bucket, numEntries, recvs, and sends.

SRtable::~SRtable (  )  [inline]

Destructor.

Definition at line 144 of file srtable.h.

References FreeTable().

Here is the call graph for this function:


Member Function Documentation

void SRtable::pup ( PUP::er p  )  [inline]

PUP routine.

Definition at line 146 of file srtable.h.

References b, buckets, end_bucket, end_overflow, PUP::er::isUnpacking(), SRentry::next, numEntries, numOverflow, offset, ofRecvs, ofSends, overflow, SRentry::pup(), PUP::PUParray(), recvs, sends, and size_b.

Referenced by PVT::pup().

Here is the call graph for this function:

Here is the caller graph for this function:

void SRtable::Initialize (  ) 

Initialize table to a minimum size.

Definition at line 31 of file srtable.C.

References b, offset, and size_b.

Referenced by PVT::PVT().

Here is the caller graph for this function:

void SRtable::Insert ( POSE_TimeType  ts,
int  sr 
) [inline]

Insert send/recv record sr at timestamp ts.

Definition at line 221 of file srtable.h.

References b, buckets, end_bucket, end_overflow, SRentry::next, offset, ofRecvs, ofSends, overflow, recvs, SRentry::recvs, sanitize(), sends, SRentry::sends, size_b, and SRentry::timestamp.

Referenced by PVT::objUpdate(), and Restructure().

Here is the call graph for this function:

Here is the caller graph for this function:

void SRtable::Insert ( SRentry e  )  [inline]

Insert an existing SRentry e.

Definition at line 268 of file srtable.h.

References b, buckets, end_bucket, end_overflow, SRentry::next, offset, ofRecvs, ofSends, overflow, recvs, SRentry::recvs, sanitize(), sends, SRentry::sends, size_b, and SRentry::timestamp.

Here is the call graph for this function:

void SRtable::Restructure ( POSE_TimeType  newGVTest,
POSE_TimeType  firstTS,
int  firstSR 
)

Restructure the table according to new GVT estimate and first send/recv.

Number of buckets and bucket size are determined from firstTS, and entries below newGVTest are discarded.

Number of buckets and bucket size are determined from firstTS, and entries below newGVTest are discarded.

Definition at line 42 of file srtable.C.

References b, buckets, CompressAndSortBucket(), PUP::d, end_bucket, end_overflow, Insert(), MapToBuckets(), SRentry::next, offset, ofRecvs, ofSends, overflow, SRentry::recvs, recvs, sanitize(), SRentry::sends, sends, size_b, and SRentry::timestamp.

Referenced by PVT::objUpdate(), and PVT::startPhase().

Here is the call graph for this function:

Here is the caller graph for this function:

void SRtable::MapToBuckets ( SRentry bkt,
SRentry endBkt,
int s,
int r 
)

Move contents of bkt to new bucket structure.

Definition at line 188 of file srtable.C.

References b, buckets, end_bucket, end_overflow, SRentry::next, offset, ofRecvs, ofSends, overflow, recvs, SRentry::recvs, sanitize(), sends, SRentry::sends, size_b, and SRentry::timestamp.

Referenced by Restructure().

Here is the call graph for this function:

Here is the caller graph for this function:

UpdateMsg * SRtable::PackTable ( POSE_TimeType  pvt,
POSE_TimeType maxSRb 
)

Compress and pack table into an UpdateMsg and return it.

Definition at line 284 of file srtable.C.

References b, buckets, SRentry::next, offset, overflow, POSE_UnsetTS, SRentry::recvs, sanitize(), SRentry::sends, size_b, SortTable(), and SRentry::timestamp.

Referenced by PVT::startPhase().

Here is the call graph for this function:

Here is the caller graph for this function:

void SRtable::SortTable (  ) 

CompressAndSort all buckets.

Definition at line 359 of file srtable.C.

References b, CompressAndSortBucket(), and sanitize().

Referenced by PackTable().

Here is the call graph for this function:

Here is the caller graph for this function:

void SRtable::CompressAndSortBucket ( POSE_TimeType  i,
int  is_overflow 
)

Compress a bucket so all SRentries have unique timestamps and are sorted.

Definition at line 373 of file srtable.C.

References buckets, end_bucket, end_overflow, SRentry::next, numEntries, numOverflow, overflow, SRentry::recvs, sanitize(), SRentry::sends, and SRentry::timestamp.

Referenced by Restructure(), and SortTable().

Here is the call graph for this function:

Here is the caller graph for this function:

void SRtable::FreeTable (  ) 

Free all buckets and overflows, reset all counts.

Definition at line 476 of file srtable.C.

References b, buckets, SRentry::next, numEntries, offset, ofRecvs, ofSends, overflow, recvs, sanitize(), sends, and size_b.

Referenced by ~SRtable().

Here is the call graph for this function:

Here is the caller graph for this function:

void SRtable::dump (  ) 

Dump data fields.

Definition at line 503 of file srtable.C.

References b, buckets, SRentry::dump(), SRentry::next, offset, overflow, and size_b.

Here is the call graph for this function:

char * SRtable::dumpString (  ) 

Dump data fields to a string.

Definition at line 526 of file srtable.C.

References b, buckets, SRentry::dumpString(), SRentry::next, overflow, and snprintf().

Here is the call graph for this function:

void SRtable::sanitize (  ) 

Check validity of data fields.

Check validity of data field.

Definition at line 556 of file srtable.C.

References b, buckets, end_bucket, end_overflow, SRentry::next, offset, ofRecvs, ofSends, overflow, recvs, SRentry::recvs, SRentry::sanitize(), sends, SRentry::sends, size_b, and SRentry::timestamp.

Referenced by CompressAndSortBucket(), FreeTable(), Insert(), MapToBuckets(), PackTable(), Restructure(), and SortTable().

Here is the call graph for this function:

Here is the caller graph for this function:

void SRtable::self_test (  ) 

Test this class.


Field Documentation

Base timestamp to index tables.

offset is the current GVT

Definition at line 113 of file srtable.h.

Referenced by dump(), FreeTable(), Initialize(), Insert(), MapToBuckets(), PackTable(), pup(), Restructure(), and sanitize().

Number of buckets to sort sends/recvs into.

Recomputed with each new offset

Definition at line 116 of file srtable.h.

Referenced by dump(), dumpString(), FreeTable(), Initialize(), Insert(), MapToBuckets(), PackTable(), pup(), Restructure(), sanitize(), and SortTable().

Size of each bucket.

Recomputed with each new offset

Definition at line 119 of file srtable.h.

Referenced by dump(), FreeTable(), Initialize(), Insert(), MapToBuckets(), PackTable(), pup(), Restructure(), and sanitize().

The buckets to sort sends/recvs into.

Only entries [0..b-1] are used

Definition at line 122 of file srtable.h.

Referenced by CompressAndSortBucket(), dump(), dumpString(), FreeTable(), Insert(), MapToBuckets(), PackTable(), pup(), Restructure(), sanitize(), and SRtable().

Pointers to the last entry of each bucket.

Only entries [0..b-1] are used

Definition at line 125 of file srtable.h.

Referenced by CompressAndSortBucket(), Insert(), MapToBuckets(), pup(), Restructure(), sanitize(), and SRtable().

Error checking on bucket counts.

Definition at line 127 of file srtable.h.

Referenced by FreeTable(), Insert(), MapToBuckets(), pup(), Restructure(), sanitize(), and SRtable().

Definition at line 127 of file srtable.h.

Referenced by FreeTable(), Insert(), MapToBuckets(), pup(), Restructure(), sanitize(), and SRtable().

Definition at line 127 of file srtable.h.

Referenced by FreeTable(), Insert(), MapToBuckets(), pup(), Restructure(), and sanitize().

Definition at line 127 of file srtable.h.

Referenced by FreeTable(), Insert(), MapToBuckets(), pup(), Restructure(), and sanitize().

The overflow bucket.

What doesn't fit in buckets goes here

Definition at line 130 of file srtable.h.

Referenced by CompressAndSortBucket(), dump(), dumpString(), FreeTable(), Insert(), MapToBuckets(), PackTable(), pup(), Restructure(), and sanitize().

End entry of overflow.

Definition at line 132 of file srtable.h.

Referenced by CompressAndSortBucket(), Insert(), MapToBuckets(), pup(), Restructure(), and sanitize().

Number of distinct timestamp entries per bucket.

This is computed in CompressAndSortBucket

Definition at line 135 of file srtable.h.

Referenced by CompressAndSortBucket(), FreeTable(), pup(), and SRtable().

Number of distinct entries in overflow bucket.

This is computed in CompressAndSortBucket

Definition at line 138 of file srtable.h.

Referenced by CompressAndSortBucket(), and pup().


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

Generated on Mon Sep 21 08:30:05 2020 for Charm++ by  doxygen 1.5.5