#include <APPSPACK_Counter.hpp>
This object is used by the Conveyor to for counting the number of cached points and the number of evaluated points, including on a per worker basis.
On errors, users can provide a message string. This counter can also track how many times each error string is returned, including on a per processor basis.
In summary, the counter tracks the following.
Definition at line 64 of file APPSPACK_Counter.hpp.
Public Member Functions | |
| Counter () | |
| ~Counter () | |
| int | getNumEvaluations () const |
| Returns the total number of evaluations. | |
| string | getCountString () const |
| Returns a string with the current global counts. | |
| void | incrementCached () |
| Increment the number of cached function values. | |
| void | incrementEvaluated (int workerId, const string &msg) |
| Increment the number of evaluations. | |
| void | print () const |
| Print the current counts | |
Private Types | |
| typedef map< string, int > | MsgCnt |
| Used the count the number of each type of evaluation. | |
| typedef map< int, MsgCnt > | WkrMsgCnt |
| Used to keep per processor counts. | |
| typedef MsgCnt::iterator | MsgCntIterator |
| Iterator for MsgCnt. | |
| typedef WkrMsgCnt::iterator | WkrMsgCntIterator |
| Iterator for WkrMsgCnt. | |
| typedef MsgCnt::const_iterator | MsgCntConstIterator |
| Const iterator for MsgCnt. | |
| typedef WkrMsgCnt::const_iterator | WkrMsgCntConstIterator |
| Const iterator for WkrMsgCnt. | |
Private Member Functions | |
| void | incrementMsgCnt (MsgCnt &mc, const string &msg) |
| Increments the number of times that the given msg has appeared in mc. | |
Private Attributes | |
| MsgCnt | msgCnt |
| The number of each user-defined type of evaluation. | |
| WkrMsgCnt | wkrMsgCnt |
| The number of each user-defined type of evaluation per worker. | |
| int | nCached |
| The total number of cached function values. | |
| int | nEvaluated |
| The total number of evaluations. | |
|
|
Used the count the number of each type of evaluation. Definition at line 98 of file APPSPACK_Counter.hpp. Referenced by incrementMsgCnt(). |
|
|
Used to keep per processor counts. Definition at line 101 of file APPSPACK_Counter.hpp. |
|
|
Iterator for MsgCnt. Definition at line 104 of file APPSPACK_Counter.hpp. Referenced by incrementMsgCnt(). |
|
|
Iterator for WkrMsgCnt. Definition at line 106 of file APPSPACK_Counter.hpp. |
|
|
Const iterator for MsgCnt. Definition at line 108 of file APPSPACK_Counter.hpp. Referenced by getCountString(), and print(). |
|
|
Const iterator for WkrMsgCnt. Definition at line 110 of file APPSPACK_Counter.hpp. Referenced by print(). |
|
|
Constructor Definition at line 40 of file APPSPACK_Counter.cpp. |
|
|
Destructor Definition at line 46 of file APPSPACK_Counter.cpp. |
|
|
Returns the total number of evaluations. Definition at line 50 of file APPSPACK_Counter.cpp. References nEvaluated. Referenced by APPSPACK::Solver::processEvaluatedTrialPoints(). |
|
|
Returns a string with the current global counts. Definition at line 55 of file APPSPACK_Counter.cpp. References msgCnt, and MsgCntConstIterator. Referenced by APPSPACK::Conveyor::exchange(). |
|
|
Increment the number of cached function values. Definition at line 63 of file APPSPACK_Counter.cpp. References nCached. Referenced by APPSPACK::Conveyor::exchange(). |
|
||||||||||||
|
Increment the number of evaluations.
References incrementMsgCnt(), msgCnt, nEvaluated, and wkrMsgCnt. Referenced by APPSPACK::Conveyor::exchange(). |
|
|
Print the current counts Definition at line 85 of file APPSPACK_Counter.cpp. References msgCnt, MsgCntConstIterator, nCached, nEvaluated, wkrMsgCnt, and WkrMsgCntConstIterator. Referenced by APPSPACK::Solver::solve(). |
|
||||||||||||
|
Increments the number of times that the given msg has appeared in mc. Definition at line 76 of file APPSPACK_Counter.cpp. References MsgCnt, and MsgCntIterator. Referenced by incrementEvaluated(). |
|
|
The number of each user-defined type of evaluation. Definition at line 117 of file APPSPACK_Counter.hpp. Referenced by getCountString(), incrementEvaluated(), and print(). |
|
|
The number of each user-defined type of evaluation per worker. Definition at line 120 of file APPSPACK_Counter.hpp. Referenced by incrementEvaluated(), and print(). |
|
|
The total number of cached function values. Definition at line 123 of file APPSPACK_Counter.hpp. Referenced by incrementCached(), and print(). |
|
|
The total number of evaluations. Definition at line 126 of file APPSPACK_Counter.hpp. Referenced by getNumEvaluations(), incrementEvaluated(), and print(). |
![]()
© Sandia Corporation | Site Contact | Privacy and Security
![]()
Generated on Wed Dec 14 18:41:05 2005 for APPSPACK 4.0.2 by
1.3.8 written by Dimitri van Heesch,
© 1997-2002