
#include <CkLoop.h>

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< int > | curChunkIdx |
| int | numChunks |
| int | chunkSize |
| REDUCTION_TYPE | type |
| HelperFn | fnPtr |
| int | lowerIndex |
| int | upperIndex |
| int | paramNum |
| void * | param |
| void ** | redBufs |
| char * | bufSpace |
| std::atomic< int > | finishFlag |
| std::atomic< int > | inited |
Friends | |
| class | FuncSingleHelper |
Definition at line 32 of file CkLoop.h.
| CurLoopInfo::CurLoopInfo | ( | int | maxChunks | ) | [inline] |
| CurLoopInfo::~CurLoopInfo | ( | ) | [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().


| void CurLoopInfo::setReductionType | ( | REDUCTION_TYPE | p | ) | [inline] |
Definition at line 97 of file CkLoop.h.
References type.
Referenced by FuncCkLoop::parallelizeFuncHybrid().

| void CurLoopInfo::setStaticFraction | ( | float | _staticFraction | ) | [inline] |
Definition at line 101 of file CkLoop.h.
References staticFraction.
Referenced by FuncCkLoop::parallelizeFuncHybrid().

| 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().


Definition at line 133 of file CkLoop.h.
References CmiMyRank(), fnPtr, localReduce(), lowerIndex, param, paramNum, type, upperIndex, and x.
Referenced by RegisterCkLoopHdlrs().


| 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().


| 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().


| int CurLoopInfo::getNextChunkIdx | ( | ) | [inline] |
Definition at line 170 of file CkLoop.h.
References curChunkIdx, and memory_order_relaxed.
Referenced by RegisterCkLoopHdlrs().

| void CurLoopInfo::reportFinished | ( | int | counter | ) | [inline] |
Definition at line 174 of file CkLoop.h.
References finishFlag, and memory_order_release.
Referenced by RegisterCkLoopHdlrs().

| 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().

| void** CurLoopInfo::getRedBufs | ( | ) | [inline] |
Definition at line 184 of file CkLoop.h.
References redBufs.
Referenced by FuncCkLoop::parallelizeFunc(), and FuncCkLoop::parallelizeFuncHybrid().

| void CurLoopInfo::stealWork | ( | ) |
Referenced by ndhThreadWork(), FuncCkLoop::parallelizeFunc(), and RegisterCkLoopHdlrs().

| void CurLoopInfo::doWorkForMyPe | ( | ) |
Referenced by FuncCkLoop::parallelizeFuncHybrid(), and RegisterCkLoopHdlrs().

friend class FuncSingleHelper [friend] |
float CurLoopInfo::staticFraction [private] |
Definition at line 36 of file CkLoop.h.
Referenced by RegisterCkLoopHdlrs(), and setStaticFraction().
std::atomic<int> CurLoopInfo::curChunkIdx [private] |
int CurLoopInfo::numChunks [private] |
Definition at line 38 of file CkLoop.h.
Referenced by isFree(), RegisterCkLoopHdlrs(), set(), and waitLoopDone().
int CurLoopInfo::chunkSize [private] |
REDUCTION_TYPE CurLoopInfo::type [private] |
Definition at line 40 of file CkLoop.h.
Referenced by RegisterCkLoopHdlrs(), runChunk(), and setReductionType().
HelperFn CurLoopInfo::fnPtr [private] |
int CurLoopInfo::lowerIndex [private] |
int CurLoopInfo::upperIndex [private] |
int CurLoopInfo::paramNum [private] |
void* CurLoopInfo::param [private] |
void** CurLoopInfo::redBufs [private] |
Definition at line 47 of file CkLoop.h.
Referenced by CurLoopInfo(), getRedBufs(), localReduce(), RegisterCkLoopHdlrs(), and ~CurLoopInfo().
char* CurLoopInfo::bufSpace [private] |
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().
1.5.5