These routines are implemented in ckfutures.C.
A "future" represents a thread of control that has been passed to another processor. It provides a place for a (local) thread to block and the machinery for resuming control based on a remote event. Futures are thus used to implement Charm++'s "[sync]" methods.
This "sequential futures abstraction" is a well-studied concept in remote process control.
| typedef int CkFutureID |
Definition at line 287 of file ckfutures.C.
References CkRemoteCallAsync(), and CkWaitReleaseFuture().
Referenced by CProxy_waitqd_QDChare::waitQD().
Definition at line 257 of file ckfutures.C.
References CkRemoteBranchCallAsync(), CkWaitReleaseFuture(), and group.
Definition at line 272 of file ckfutures.C.
References CkRemoteNodeBranchCallAsync(), CkWaitReleaseFuture(), and group.
| CkFutureID CkRemoteCallAsync | ( | int | eIdx, | |
| void * | msg, | |||
| const CkChareID * | chare | |||
| ) |
Definition at line 279 of file ckfutures.C.
References CkCreateAttachedFuture(), and CkSendMsg().
Referenced by CkRemoteCall().
| CkFutureID CkRemoteBranchCallAsync | ( | int | eIdx, | |
| void * | msg, | |||
| CkGroupID | gID, | |||
| int | pe | |||
| ) |
Definition at line 249 of file ckfutures.C.
References CkCreateAttachedFuture(), CkSendMsgBranch(), and group.
Referenced by CkRemoteBranchCall().
| CkFutureID CkRemoteNodeBranchCallAsync | ( | int | eIdx, | |
| void * | msg, | |||
| CkGroupID | gID, | |||
| int | node | |||
| ) |
Definition at line 264 of file ckfutures.C.
References CkCreateAttachedFuture(), CkSendMsgNodeBranch(), and group.
Referenced by CkRemoteNodeBranchCall().
| void * CkWaitFuture | ( | CkFutureID | futNum | ) |
Definition at line 177 of file ckfutures.C.
References FutureState::array, CthSelf(), CthSetNext(), CthSuspend(), Future_s::ready, Future_s::value, value, and Future_s::waiters.
Referenced by CkWaitReleaseFuture(), CkWaitVoidFuture(), ampi::winAccumulate(), ampi::winGet(), ampi::winLock(), ampi::winPut(), and ampi::winUnlock().
| void CkWaitVoidFuture | ( | CkFutureID | futNum | ) |
| void CkReleaseFuture | ( | CkFutureID | futNum | ) |
Definition at line 160 of file ckfutures.C.
References FutureState::array, FutureState::freelist, and Future_s::next.
Referenced by CkWaitReleaseFuture().
| int CkProbeFuture | ( | CkFutureID | futNum | ) |
| void CkSendToFuture | ( | CkFutureID | futNum, | |
| void * | msg, | |||
| int | pe | |||
| ) |
Definition at line 365 of file ckfutures.C.
References _fbocID, CProxy_FutureBOC::SetFuture(), envelope::setRef(), and UsrToEnv().
Referenced by CkIndex_waitqd_QDChare::_callthr_waitQD_void(), win_obj::lock(), win_obj::unlock(), ampi::winRemoteAccumulate(), ampi::winRemoteGet(), and ampi::winRemotePut().
| CkFutureID CkCreateAttachedFuture | ( | void * | msg | ) |
Definition at line 294 of file ckfutures.C.
References createFuture(), envelope::setRef(), and UsrToEnv().
Referenced by CkRemoteBranchCallAsync(), CkRemoteCallAsync(), CkRemoteNodeBranchCallAsync(), CProxyElement_ArrayBase::ckSendSync(), ampi::winAccumulate(), ampi::winGet(), ampi::winLock(), ampi::winPut(), and ampi::winUnlock().
| CkFutureID CkCreateAttachedFutureSend | ( | void * | msg, | |
| int | ep, | |||
| struct CkArrayID | id, | |||
| struct CkArrayIndexMax | idx, | |||
| void(*)(structCkArrayID, struct CkArrayIndexMax, void *, int, int) | fptr, | |||
| int size | CK_MSGOPTIONAL | |||
| ) |
| void * CkWaitReleaseFuture | ( | CkFutureID | futNum | ) |
Definition at line 327 of file ckfutures.C.
References CkReleaseFuture(), CkWaitFuture(), IGetControlClass::iget_free(), IGetControlClass::iget_resend(), and TheIGetControlClass.
Referenced by AMPI_Alltoall2(), CkRemoteBranchCall(), CkRemoteCall(), CkRemoteNodeBranchCall(), CProxyElement_ArrayBase::ckSendSync(), and ampi::winIGetWait().
| CkSemaID CkSemaCreate | ( | void | ) |
| void * CkSemaWait | ( | CkSemaID | id | ) |
| void CkSemaSignal | ( | CkSemaID | id, | |
| void * | m | |||
| ) |
Definition at line 404 of file ckfutures.C.
References _fbocID, envelope::setRef(), CProxy_FutureBOC::SetSema(), and UsrToEnv().
| void CkSemaDestroy | ( | CkSemaID | id | ) |
| CpvStaticDeclare | ( | FutureState | , | |
| futurestate | ||||
| ) |
| CpvStaticDeclare | ( | CkSemaPool * | , | |
| semapool | ||||
| ) |
Definition at line 124 of file ckfutures.C.
References FutureState::array, FutureState::freelist, and Future_s::next.
Referenced by _futuresModuleInit(), and createFuture().
| static int createFuture | ( | void | ) | [static] |
Definition at line 136 of file ckfutures.C.
References addedFutures(), FutureState::array, FutureState::freelist, FutureState::max, Future_s::next, Future_s::ready, realloc(), Future_s::value, and Future_s::waiters.
Referenced by CkCreateAttachedFuture(), and CkCreateAttachedFutureSend().
| static void setFuture | ( | CkFutureID | handle, | |
| void * | pointer | |||
| ) | [static] |
Definition at line 206 of file ckfutures.C.
References FutureState::array, CthAwaken(), CthGetNext(), Future_s::ready, Future_s::value, and Future_s::waiters.
Referenced by FutureBOC::SetFuture().
| void _futuresModuleInit | ( | void | ) |
Definition at line 221 of file ckfutures.C.
References addedFutures(), and malloc().
Referenced by _initCharm().
| CkFutureID CkCreateAttachedFutureSend | ( | void * | msg, | |
| int | ep, | |||
| CkArrayID | id, | |||
| CkArrayIndexMax | idx, | |||
| void(*)(CkArrayID, CkArrayIndexMax, void *, int, int) | fptr, | |||
| int | size | |||
| ) |
Definition at line 301 of file ckfutures.C.
References createFuture(), IGetControlClass::iget_request(), envelope::setRef(), size, TheIGetControlClass, and UsrToEnv().
Definition at line 233 of file ckfutures.C.
Referenced by __xlater_roPup__fbocID(), _registerCkFutures(), CkSemaSignal(), CkSendToFuture(), and FutureMain::FutureMain().
1.5.1