MsmProfiler Class Reference

List of all members.

Public Types

 MAX = MSM_MAX_BLOCK_SIZE+1
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.

00320 { MAX = MSM_MAX_BLOCK_SIZE+1 };


Constructor & Destructor Documentation

MsmProfiler::MsmProfiler (  )  [inline]

Definition at line 322 of file ComputeMsm.C.

References MAX, and xloopcnt.

00322                   {
00323       for (int i = 0;  i < MAX;  i++)  xloopcnt[i] = 0;
00324     }


Member Function Documentation

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

Definition at line 325 of file ComputeMsm.C.

References MAX, print(), and xloopcnt.

00325                                {
00326       for (int i = 0;  i < MAX;  i++)  xloopcnt[i] = lc[i];
00327       print();
00328     }

void MsmProfiler::print (  )  [inline]

Definition at line 329 of file ComputeMsm.C.

References MAX, and xloopcnt.

Referenced by done().

00329                  {
00330       int sum = 0;
00331       for (int i = 0;  i < MAX;  i++)  sum += xloopcnt[i];
00332       CkPrintf("MSM profiling:\n");
00333       CkPrintf("   total executions of inner loop:   %d\n", sum);
00334       for (int i = 0;  i < MAX;  i++) {
00335         CkPrintf("   executing %d times:   %d  (%5.2f%%)\n",
00336             i, xloopcnt[i], 100*double(xloopcnt[i])/sum);
00337       }
00338     }


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:
Generated on Mon Sep 25 01:17:19 2017 for NAMD by  doxygen 1.4.7