PPL Logo

CurLoopInfo Class Reference

#include <CkLoop.h>

Collaboration diagram for CurLoopInfo:

Collaboration graph
[legend]

Public Member Functions

 CurLoopInfo (int maxChunks)
 ~CurLoopInfo ()
void set (int nc, HelperFn f, int lIdx, int uIdx, int numParams, void *p)
void setReductionType (REDUCTION_TYPE p)
void setStaticFraction (float _staticFraction)
void localReduce (double x, REDUCTION_TYPE type)
void runChunk (int sInd, int eInd)
void waitLoopDone (int sync)
void waitLoopDoneHybrid (int sync)
int getNextChunkIdx ()
void reportFinished (int counter)
int isFree ()
void ** getRedBufs ()
void stealWork ()
void doWorkForMyPe ()

Private Attributes

float staticFraction
std::atomic< intcurChunkIdx
int numChunks
int chunkSize
REDUCTION_TYPE type
HelperFn fnPtr
int lowerIndex
int upperIndex
int paramNum
void * param
void ** redBufs
char * bufSpace
std::atomic< intfinishFlag
std::atomic< intinited

Friends

class FuncSingleHelper

Detailed Description

Definition at line 32 of file CkLoop.h.


Constructor & Destructor Documentation

CurLoopInfo::CurLoopInfo ( int  maxChunks  )  [inline]

Definition at line 62 of file CkLoop.h.

References bufSpace, and redBufs.

CurLoopInfo::~CurLoopInfo (  )  [inline]

Definition at line 69 of file CkLoop.h.

References bufSpace, and redBufs.


Member Function Documentation

void CurLoopInfo::set ( int  nc,
HelperFn  f,
int  lIdx,
int  uIdx,
int  numParams,
void *  p 
) [inline]

Definition at line 74 of file CkLoop.h.

References CmiLock(), CmiUnlock(), curChunkIdx, finishFlag, fnPtr, inited, loop_info_inited_lock, lowerIndex, numChunks, p, param, paramNum, and upperIndex.

Referenced by FuncCkLoop::parallelizeFunc(), and FuncCkLoop::parallelizeFuncHybrid().

Here is the call graph for this function:

Here is the caller graph for this function:

void CurLoopInfo::setReductionType ( REDUCTION_TYPE  p  )  [inline]

Definition at line 97 of file CkLoop.h.

References type.

Referenced by FuncCkLoop::parallelizeFuncHybrid().

Here is the caller graph for this function:

void CurLoopInfo::setStaticFraction ( float  _staticFraction  )  [inline]

Definition at line 101 of file CkLoop.h.

References staticFraction.

Referenced by FuncCkLoop::parallelizeFuncHybrid().

Here is the caller graph for this function:

void CurLoopInfo::localReduce ( double  x,
REDUCTION_TYPE  type 
) [inline]

Definition at line 107 of file CkLoop.h.

References CKLOOP_DOUBLE_MAX, CKLOOP_DOUBLE_SUM, CKLOOP_FLOAT_SUM, CKLOOP_INT_SUM, CmiMyRank(), and redBufs.

Referenced by RegisterCkLoopHdlrs(), and runChunk().

Here is the call graph for this function:

Here is the caller graph for this function:

void CurLoopInfo::runChunk ( int  sInd,
int  eInd 
) [inline]

Definition at line 133 of file CkLoop.h.

References CmiMyRank(), fnPtr, localReduce(), lowerIndex, param, paramNum, type, upperIndex, and x.

Referenced by RegisterCkLoopHdlrs().

Here is the call graph for this function:

Here is the caller graph for this function:

void CurLoopInfo::waitLoopDone ( int  sync  )  [inline]

Definition at line 145 of file CkLoop.h.

References CmiLock(), CmiUnlock(), finishFlag, inited, loop_info_inited_lock, memory_order_acquire, memory_order_relaxed, and numChunks.

Referenced by FuncCkLoop::parallelizeFunc().

Here is the call graph for this function:

Here is the caller graph for this function:

void CurLoopInfo::waitLoopDoneHybrid ( int  sync  )  [inline]

Definition at line 155 of file CkLoop.h.

References CmiLock(), CmiUnlock(), count, inited, and loop_info_inited_lock.

Referenced by FuncCkLoop::parallelizeFuncHybrid().

Here is the call graph for this function:

Here is the caller graph for this function:

int CurLoopInfo::getNextChunkIdx (  )  [inline]

Definition at line 170 of file CkLoop.h.

References curChunkIdx, and memory_order_relaxed.

Referenced by RegisterCkLoopHdlrs().

Here is the caller graph for this function:

void CurLoopInfo::reportFinished ( int  counter  )  [inline]

Definition at line 174 of file CkLoop.h.

References finishFlag, and memory_order_release.

Referenced by RegisterCkLoopHdlrs().

Here is the caller graph for this function:

int CurLoopInfo::isFree (  )  [inline]

Definition at line 179 of file CkLoop.h.

References finishFlag, memory_order_acquire, and numChunks.

Referenced by FuncSingleHelper::getNewTask(), FuncSingleHelper::getNotifyMsg(), and RegisterCkLoopHdlrs().

Here is the caller graph for this function:

void** CurLoopInfo::getRedBufs (  )  [inline]

Definition at line 184 of file CkLoop.h.

References redBufs.

Referenced by FuncCkLoop::parallelizeFunc(), and FuncCkLoop::parallelizeFuncHybrid().

Here is the caller graph for this function:

void CurLoopInfo::stealWork (  ) 

Referenced by ndhThreadWork(), FuncCkLoop::parallelizeFunc(), and RegisterCkLoopHdlrs().

Here is the caller graph for this function:

void CurLoopInfo::doWorkForMyPe (  ) 

Referenced by FuncCkLoop::parallelizeFuncHybrid(), and RegisterCkLoopHdlrs().

Here is the caller graph for this function:


Friends And Related Function Documentation

friend class FuncSingleHelper [friend]

Definition at line 33 of file CkLoop.h.


Field Documentation

Definition at line 36 of file CkLoop.h.

Referenced by RegisterCkLoopHdlrs(), and setStaticFraction().

std::atomic<int> CurLoopInfo::curChunkIdx [private]

Definition at line 37 of file CkLoop.h.

Referenced by getNextChunkIdx(), and set().

Definition at line 38 of file CkLoop.h.

Referenced by isFree(), RegisterCkLoopHdlrs(), set(), and waitLoopDone().

Definition at line 39 of file CkLoop.h.

Referenced by RegisterCkLoopHdlrs().

Definition at line 40 of file CkLoop.h.

Referenced by RegisterCkLoopHdlrs(), runChunk(), and setReductionType().

Definition at line 41 of file CkLoop.h.

Referenced by RegisterCkLoopHdlrs(), runChunk(), and set().

Definition at line 42 of file CkLoop.h.

Referenced by RegisterCkLoopHdlrs(), runChunk(), and set().

Definition at line 43 of file CkLoop.h.

Referenced by RegisterCkLoopHdlrs(), runChunk(), and set().

Definition at line 44 of file CkLoop.h.

Referenced by RegisterCkLoopHdlrs(), runChunk(), and set().

void* CurLoopInfo::param [private]

Definition at line 45 of file CkLoop.h.

Referenced by RegisterCkLoopHdlrs(), runChunk(), and set().

void** CurLoopInfo::redBufs [private]

Definition at line 47 of file CkLoop.h.

Referenced by CurLoopInfo(), getRedBufs(), localReduce(), RegisterCkLoopHdlrs(), and ~CurLoopInfo().

char* CurLoopInfo::bufSpace [private]

Definition at line 48 of file CkLoop.h.

Referenced by CurLoopInfo(), and ~CurLoopInfo().

std::atomic<int> CurLoopInfo::finishFlag [private]

Definition at line 50 of file CkLoop.h.

Referenced by isFree(), reportFinished(), set(), and waitLoopDone().

std::atomic<int> CurLoopInfo::inited [private]

Definition at line 54 of file CkLoop.h.

Referenced by RegisterCkLoopHdlrs(), set(), waitLoopDone(), and waitLoopDoneHybrid().


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

Generated on Mon Sep 21 08:22:31 2020 for Charm++ by  doxygen 1.5.5