PPL Logo

CkFutures

To call [sync] entry methods, we need a way to block the current Converse thread until the called method returns. More...

Data Structures

struct  Future_s
struct  FutureState
class  CkSema
class  CkSemaPool
class  FutureInitMsg
class  FutureMain
class  FutureBOC
struct  _CkFuture

Typedefs

typedef struct Future_s Future
typedef int CkFutureID
typedef struct _CkFuture CkFuture

Functions

 CpvStaticDeclare (FutureState, futurestate)
 CpvStaticDeclare (CkSemaPool *, semapool)
static void addedFutures (int lo, int hi)
static int createFuture (void)
CkFuture CkCreateFuture (void)
void CkReleaseFutureID (CkFutureID handle)
int CkProbeFutureID (CkFutureID handle)
void * CkWaitFutureID (CkFutureID handle)
void CkReleaseFuture (CkFuture fut)
int CkProbeFuture (CkFuture fut)
void * CkWaitFuture (CkFuture fut)
void CkWaitVoidFuture (CkFutureID handle)
static void setFuture (CkFutureID handle, void *pointer)
void _futuresModuleInit (void)
CkFutureID CkRemoteBranchCallAsync (int ep, void *m, CkGroupID group, int PE)
void * CkRemoteBranchCall (int ep, void *m, CkGroupID group, int PE)
CkFutureID CkRemoteNodeBranchCallAsync (int ep, void *m, CkGroupID group, int node)
void * CkRemoteNodeBranchCall (int ep, void *m, CkGroupID group, int node)
CkFutureID CkRemoteCallAsync (int ep, void *m, const CkChareID *ID)
void * CkRemoteCall (int ep, void *m, const CkChareID *ID)
CkFutureID CkCreateAttachedFuture (void *msg)
CkFutureID CkCreateAttachedFutureSend (void *msg, int ep, CkArrayID id, CkArrayIndex idx, void(*fptr)(CkArrayID, CkArrayIndex, void *, int, int), int size)
void * CkWaitReleaseFuture (CkFutureID futNum)
void CkSendToFutureID (CkFutureID futNum, void *m, int PE)
void CkSendToFuture (CkFuture fut, void *msg)
CkSemaID CkSemaCreate (void)
void * CkSemaWait (CkSemaID id)
void CkSemaWaitN (CkSemaID id, int n, void *marray[])
void CkSemaSignal (CkSemaID id, void *m)
void CkSemaDestroy (CkSemaID id)
 PUPbytes (CkFuture) struct CkArrayID
CkFutureID CkCreateAttachedFutureSend (void *msg, int ep, struct CkArrayID id, CkArrayIndex idx, void(*fptr)(struct CkArrayID, CkArrayIndex, void *, int, int), int size CK_MSGOPTIONAL)

Variables

CkGroupID _fbocID
int _CkFuture::pe

Detailed Description

To call [sync] entry methods, we need a way to block the current Converse thread until the called method returns.

Futures--ways to block Converse threads on remote events.

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.

These routines are implemented in ckfutures.C.


Typedef Documentation

typedef struct Future_s Future

typedef int CkFutureID

Definition at line 13 of file ckfutures.h.

typedef struct _CkFuture CkFuture


Function Documentation

CpvStaticDeclare ( FutureState  ,
futurestate   
)

CpvStaticDeclare ( CkSemaPool ,
semapool   
)

static void addedFutures ( int  lo,
int  hi 
) [static]

Definition at line 117 of file ckfutures.C.

References FutureState::array, array, FutureState::freelist, and Future_s::next.

Referenced by _futuresModuleInit(), and createFuture().

Here is the caller graph for this function:

static int createFuture ( void   )  [inline, static]

Definition at line 131 of file ckfutures.C.

References addedFutures(), FutureState::array, FutureState::freelist, handle, FutureState::max, Future_s::next, Future_s::ready, realloc(), Future_s::value, and Future_s::waiters.

Referenced by CkCreateAttachedFuture(), CkCreateAttachedFutureSend(), and CkCreateFuture().

Here is the call graph for this function:

Here is the caller graph for this function:

CkFuture CkCreateFuture ( void   ) 

Definition at line 154 of file ckfutures.C.

References Converse::CkMyPe(), createFuture(), _CkFuture::id, and _CkFuture::pe.

Here is the call graph for this function:

void CkReleaseFutureID ( CkFutureID  handle  ) 

Definition at line 162 of file ckfutures.C.

References FutureState::array, FutureState::freelist, and Future_s::next.

Referenced by CkReleaseFuture(), and CkWaitReleaseFuture().

Here is the caller graph for this function:

int CkProbeFutureID ( CkFutureID  handle  ) 

Definition at line 170 of file ckfutures.C.

References FutureState::array, and Future_s::ready.

Referenced by CkProbeFuture().

Here is the caller graph for this function:

void * CkWaitFutureID ( CkFutureID  handle  ) 

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 CkWaitFuture(), CkWaitReleaseFuture(), and CkWaitVoidFuture().

Here is the call graph for this function:

Here is the caller graph for this function:

void CkReleaseFuture ( CkFuture  fut  ) 

Definition at line 200 of file ckfutures.C.

References CkReleaseFutureID(), and _CkFuture::id.

Here is the call graph for this function:

int CkProbeFuture ( CkFuture  fut  ) 

Definition at line 205 of file ckfutures.C.

References CkProbeFutureID(), and _CkFuture::id.

Here is the call graph for this function:

void * CkWaitFuture ( CkFuture  fut  ) 

Definition at line 210 of file ckfutures.C.

References CkWaitFutureID(), and _CkFuture::id.

Here is the call graph for this function:

void CkWaitVoidFuture ( CkFutureID  handle  ) 

Definition at line 215 of file ckfutures.C.

References CkFreeMsg(), and CkWaitFutureID().

Here is the call graph for this function:

static void setFuture ( CkFutureID  handle,
void *  pointer 
) [static]

Definition at line 220 of file ckfutures.C.

References FutureState::array, CthAwaken(), CthGetNext(), Future_s::ready, PUP::t, Future_s::value, and Future_s::waiters.

Referenced by FutureBOC::SetFuture().

Here is the call graph for this function:

Here is the caller graph for this function:

void _futuresModuleInit ( void   ) 

Definition at line 235 of file ckfutures.C.

References addedFutures(), array, and malloc().

Referenced by _initCharm().

Here is the call graph for this function:

Here is the caller graph for this function:

CkFutureID CkRemoteBranchCallAsync ( int  ep,
void *  m,
CkGroupID  group,
int  PE 
)

Definition at line 263 of file ckfutures.C.

References CkCreateAttachedFuture(), and CkSendMsgBranch().

Referenced by CkRemoteBranchCall().

Here is the call graph for this function:

Here is the caller graph for this function:

void * CkRemoteBranchCall ( int  ep,
void *  m,
CkGroupID  group,
int  PE 
)

Definition at line 271 of file ckfutures.C.

References CkRemoteBranchCallAsync(), and CkWaitReleaseFuture().

Here is the call graph for this function:

CkFutureID CkRemoteNodeBranchCallAsync ( int  ep,
void *  m,
CkGroupID  group,
int  node 
)

Definition at line 278 of file ckfutures.C.

References CkCreateAttachedFuture(), and CkSendMsgNodeBranch().

Referenced by CkRemoteNodeBranchCall().

Here is the call graph for this function:

Here is the caller graph for this function:

void * CkRemoteNodeBranchCall ( int  ep,
void *  m,
CkGroupID  group,
int  node 
)

Definition at line 286 of file ckfutures.C.

References CkRemoteNodeBranchCallAsync(), and CkWaitReleaseFuture().

Here is the call graph for this function:

CkFutureID CkRemoteCallAsync ( int  ep,
void *  m,
const CkChareID ID 
)

Definition at line 293 of file ckfutures.C.

References CkCreateAttachedFuture(), and CkSendMsg().

Referenced by CkRemoteCall().

Here is the call graph for this function:

Here is the caller graph for this function:

void * CkRemoteCall ( int  ep,
void *  m,
const CkChareID ID 
)

Definition at line 301 of file ckfutures.C.

References CkRemoteCallAsync(), and CkWaitReleaseFuture().

Here is the call graph for this function:

CkFutureID CkCreateAttachedFuture ( void *  msg  ) 

Definition at line 308 of file ckfutures.C.

References createFuture(), envelope::setRef(), and UsrToEnv().

Referenced by CkRemoteBranchCallAsync(), CkRemoteCallAsync(), and CkRemoteNodeBranchCallAsync().

Here is the call graph for this function:

Here is the caller graph for this function:

CkFutureID CkCreateAttachedFutureSend ( void *  msg,
int  ep,
CkArrayID  id,
CkArrayIndex  idx,
void(*)(CkArrayID, CkArrayIndex, void *, int, int fptr,
int  size 
)

Definition at line 315 of file ckfutures.C.

References createFuture(), IGetControlClass::iget_request(), envelope::setRef(), TheIGetControlClass, and UsrToEnv().

Here is the call graph for this function:

void * CkWaitReleaseFuture ( CkFutureID  futNum  ) 

Definition at line 341 of file ckfutures.C.

References CkReleaseFutureID(), CkWaitFutureID(), IGetControlClass::iget_free(), IGetControlClass::iget_resend(), and TheIGetControlClass.

Referenced by CkRemoteBranchCall(), CkRemoteCall(), and CkRemoteNodeBranchCall().

Here is the call graph for this function:

Here is the caller graph for this function:

void CkSendToFutureID ( CkFutureID  futNum,
void *  m,
int  PE 
)

Definition at line 379 of file ckfutures.C.

References envelope::setRef(), and UsrToEnv().

Referenced by CkSendToFuture().

Here is the call graph for this function:

Here is the caller graph for this function:

void CkSendToFuture ( CkFuture  fut,
void *  msg 
)

Definition at line 386 of file ckfutures.C.

References CkSendToFutureID(), _CkFuture::id, and _CkFuture::pe.

Here is the call graph for this function:

CkSemaID CkSemaCreate ( void   ) 

Definition at line 391 of file ckfutures.C.

References Converse::CkMyPe().

Here is the call graph for this function:

void* CkSemaWait ( CkSemaID  id  ) 

Definition at line 399 of file ckfutures.C.

References Converse::CkMyPe().

Here is the call graph for this function:

void CkSemaWaitN ( CkSemaID  id,
int  n,
void *  marray[] 
)

Definition at line 409 of file ckfutures.C.

References Converse::CkMyPe().

Here is the call graph for this function:

void CkSemaSignal ( CkSemaID  id,
void *  m 
)

Definition at line 419 of file ckfutures.C.

References envelope::setRef(), and UsrToEnv().

Here is the call graph for this function:

void CkSemaDestroy ( CkSemaID  id  ) 

Definition at line 426 of file ckfutures.C.

References Converse::CkMyPe().

Here is the call graph for this function:

PUPbytes ( CkFuture   ) 

CkFutureID CkCreateAttachedFutureSend ( void *  msg,
int  ep,
struct CkArrayID  id,
CkArrayIndex  idx,
void(*)(struct CkArrayID, CkArrayIndex, void *, int, int fptr,
int size  CK_MSGOPTIONAL 
)


Variable Documentation

Definition at line 247 of file ckfutures.C.

int _CkFuture::pe [inherited]

Definition at line 16 of file ckfutures.h.

Referenced by CkCreateFuture(), and CkSendToFuture().


Generated on Mon Sep 21 08:16:40 2020 for Charm++ by  doxygen 1.5.5