ProxyUsage Class Reference

#include <Rebalancer.h>

List of all members.

Public Member Functions

 ProxyUsage ()
void increment (int pe, int patch)
void decrement (int pe, int patch)
int getVal (int pe, int patch)

Protected Attributes

CkHashtableT< ProxyUsageKey,
int > 
htable


Detailed Description

Definition at line 72 of file Rebalancer.h.


Constructor & Destructor Documentation

ProxyUsage::ProxyUsage (  )  [inline]

Definition at line 78 of file Rebalancer.h.

00078 : htable (1217, 0.5) {}   //pass in a large prime close to 


Member Function Documentation

void ProxyUsage::decrement ( int  pe,
int  patch 
) [inline]

Definition at line 88 of file Rebalancer.h.

References htable.

Referenced by Rebalancer::deAssign().

00088                                      {
00089     ProxyUsageKey  pkey (pe, patch);
00090     
00091     int val = htable.get (pkey);
00092     CkAssert (val > 0);
00093     val --;
00094 
00095     if (val == 0)
00096       htable.remove (pkey);
00097     else 
00098       htable.put (pkey) = val; 
00099   }

int ProxyUsage::getVal ( int  pe,
int  patch 
) [inline]

Definition at line 101 of file Rebalancer.h.

References htable.

Referenced by Rebalancer::deAssign().

00101                                  {
00102     ProxyUsageKey  pkey (pe, patch);  
00103     return htable.get (pkey);
00104   }

void ProxyUsage::increment ( int  pe,
int  patch 
) [inline]

Definition at line 81 of file Rebalancer.h.

References htable.

Referenced by Rebalancer::assign(), and Rebalancer::InitProxyUsage().

00081                                      {
00082     ProxyUsageKey  pkey (pe, patch);
00083 
00084     int val = htable.get (pkey);
00085     htable.put (pkey) =  val + 1;      
00086   }


Member Data Documentation

CkHashtableT<ProxyUsageKey, int> ProxyUsage::htable [protected]

Definition at line 74 of file Rebalancer.h.

Referenced by decrement(), getVal(), and increment().


The documentation for this class was generated from the following file:
Generated on Thu Nov 23 01:17:20 2017 for NAMD by  doxygen 1.4.7