示例#1
0
文件: ddi_armci.c 项目: ryanolson/ddi
void DDI_ARMCI_Release(const DDA_ARMCI_Index *index, int handle, int proc, int ltype) {
  int semid = index[proc].semid;
  int commid = gv(dda_comm)[handle];
  const DDI_Comm *comm = (const DDI_Comm *) Comm_find(commid);
  int armci_proc = comm->global_pid[proc];

#if defined DDI_ARMCI_LOCK
  DDI_ARMCI_Unlock(semid,armci_proc);
#endif
}
示例#2
0
/** @see ddi_armci.h */
void DDI_ARMCI_Release(int handle, int pid, int ltype) {
  DDA_Remote_Index *remoteIndex = gv(dda_remote_index)[handle];
  int commid = gv(dda_index)[handle].commId;
  const DDI_Comm *comm = (const DDI_Comm*)Comm_find(commid);
  int armciPid_;
  int mutex;

  if (pid < 0) pid = comm->me;
  armciPid_ = comm->global_pid[pid];
  mutex = remoteIndex[pid].mutex;
  
#if defined DDI_ARMCI_LOCK
  DDI_ARMCI_Unlock(mutex, armciPid_);
#endif
}