#include <ReductionMgr.h>
Public Member Functions | |
| ReductionSetData * | getData (int seqNum) |
| ReductionSetData * | removeData (int seqNum) |
| ReductionSet (int setID, int size, int numChildren) | |
| ~ReductionSet () | |
Public Attributes | |
| int | reductionSetID |
| int | nextSequenceNumber |
| int | submitsRegistered |
| int | dataSize |
| ReductionSetData * | dataQueue |
| int | requireRegistered |
| int | threadIsWaiting |
| int | waitingForSequenceNumber |
| CthThread | waitingThread |
| int * | addToRemoteSequenceNumber |
|
||||||||||||||||
|
Definition at line 57 of file ReductionMgr.C. References addToRemoteSequenceNumber, dataQueue, dataSize, NAMD_bug(), nextSequenceNumber, REDUCTIONS_BASIC, reductionSetID, requireRegistered, submitsRegistered, and threadIsWaiting. 00057 {
00058 if ( setID == REDUCTIONS_BASIC || setID == REDUCTIONS_AMD ) {
00059 if ( size != -1 ) {
00060 NAMD_bug("ReductionSet size specified for REDUCTIONS_BASIC or REDUCTIONS_AMD.");
00061 }
00062 size = REDUCTION_MAX_RESERVED;
00063 }
00064 if ( size == -1 ) NAMD_bug("ReductionSet size not specified.");
00065 dataSize = size;
00066 reductionSetID = setID;
00067 nextSequenceNumber = 0;
00068 submitsRegistered = 0;
00069 dataQueue = 0;
00070 requireRegistered = 0;
00071 threadIsWaiting = 0;
00072 addToRemoteSequenceNumber = new int[numChildren];
00073 }
|
|
|
Definition at line 75 of file ReductionMgr.C. References ReductionSetData::next. 00075 {
00076
00077 ReductionSetData *current = dataQueue;
00078
00079 while ( current ) {
00080 ReductionSetData *next = current->next;
00081 delete current;
00082 current = next;
00083 }
00084 delete [] addToRemoteSequenceNumber;
00085 }
|
|
|
Definition at line 88 of file ReductionMgr.C. References dataSize. Referenced by ReductionMgr::remoteRegister(), ReductionMgr::remoteSubmit(), ReductionMgr::remoteUnregister(), ReductionMgr::willRequire(), and ReductionMgr::willSubmit(). 00088 {
00089
00090 ReductionSetData **current = &dataQueue;
00091
00092 while ( *current ) {
00093 if ( (*current)->sequenceNumber == seqNum ) return *current;
00094 current = &((*current)->next);
00095 }
00096
00097 //iout << "seq " << seqNum << " created on " << CkMyPe() << "\n" << endi;
00098 *current = new ReductionSetData(seqNum, dataSize);
00099 return *current;
00100 }
|
|
|
Definition at line 103 of file ReductionMgr.C. References NAMD_die(), and ReductionSetData::next. 00103 {
00104
00105 ReductionSetData **current = &dataQueue;
00106
00107 while ( *current ) {
00108 if ( (*current)->sequenceNumber == seqNum ) break;
00109 current = &((*current)->next);
00110 }
00111
00112 if ( ! *current ) { NAMD_die("ReductionSet::removeData on missing seqNum"); }
00113
00114 ReductionSetData *toremove = *current;
00115 *current = (*current)->next;
00116 return toremove;
00117 }
|
|
|
Definition at line 215 of file ReductionMgr.h. Referenced by ReductionSet(), ReductionMgr::remoteRegister(), and ReductionMgr::remoteSubmit(). |
|
|
Definition at line 206 of file ReductionMgr.h. Referenced by ReductionSet(). |
|
|
Definition at line 205 of file ReductionMgr.h. Referenced by getData(), ReductionSet(), and ReductionMgr::remoteSubmit(). |
|
|
Definition at line 203 of file ReductionMgr.h. Referenced by ReductionSet(), ReductionMgr::remoteRegister(), ReductionMgr::remoteUnregister(), ReductionMgr::willRequire(), and ReductionMgr::willSubmit(). |
|
|
Definition at line 202 of file ReductionMgr.h. Referenced by ReductionSet(). |
|
|
Definition at line 209 of file ReductionMgr.h. Referenced by ReductionSet(), and ReductionMgr::willRequire(). |
|
|
Definition at line 204 of file ReductionMgr.h. Referenced by ReductionSet(), ReductionMgr::remoteRegister(), ReductionMgr::remoteSubmit(), ReductionMgr::remoteUnregister(), and ReductionMgr::willSubmit(). |
|
|
Definition at line 210 of file ReductionMgr.h. Referenced by ReductionSet(). |
|
|
Definition at line 211 of file ReductionMgr.h. |
|
|
Definition at line 212 of file ReductionMgr.h. |
1.3.9.1