NAMD
Public Types | Public Member Functions | Public Attributes | List of all members
MsmProfiler Class Reference
Inheritance diagram for MsmProfiler:

Public Types

enum  { MAX = MSM_MAX_BLOCK_SIZE+1 }
 

Public Member Functions

 MsmProfiler ()
 
void done (int lc[], int n)
 
void print ()
 

Public Attributes

int xloopcnt [MAX]
 

Detailed Description

Definition at line 318 of file ComputeMsm.C.

Member Enumeration Documentation

anonymous enum
Enumerator
MAX 

Definition at line 320 of file ComputeMsm.C.

320 { MAX = MSM_MAX_BLOCK_SIZE+1 };
#define MSM_MAX_BLOCK_SIZE
Definition: MsmMap.h:36

Constructor & Destructor Documentation

MsmProfiler::MsmProfiler ( )
inline

Definition at line 322 of file ComputeMsm.C.

References MAX, and xloopcnt.

322  {
323  for (int i = 0; i < MAX; i++) xloopcnt[i] = 0;
324  }
int xloopcnt[MAX]
Definition: ComputeMsm.C:340

Member Function Documentation

void MsmProfiler::done ( int  lc[],
int  n 
)
inline

Definition at line 325 of file ComputeMsm.C.

References MAX, print(), and xloopcnt.

325  {
326  for (int i = 0; i < MAX; i++) xloopcnt[i] = lc[i];
327  print();
328  }
int xloopcnt[MAX]
Definition: ComputeMsm.C:340
void print()
Definition: ComputeMsm.C:329
void MsmProfiler::print ( )
inline

Definition at line 329 of file ComputeMsm.C.

References MAX, and xloopcnt.

Referenced by done().

329  {
330  int sum = 0;
331  for (int i = 0; i < MAX; i++) sum += xloopcnt[i];
332  CkPrintf("MSM profiling:\n");
333  CkPrintf(" total executions of inner loop: %d\n", sum);
334  for (int i = 0; i < MAX; i++) {
335  CkPrintf(" executing %d times: %d (%5.2f%%)\n",
336  i, xloopcnt[i], 100*double(xloopcnt[i])/sum);
337  }
338  }
int xloopcnt[MAX]
Definition: ComputeMsm.C:340

Member Data Documentation

int MsmProfiler::xloopcnt[MAX]

Definition at line 340 of file ComputeMsm.C.

Referenced by done(), MsmProfiler(), and print().


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