PPL Logo

FEM_lock Class Reference

there is one fem_lock associated with every FEM_Mesh: Chunk Lock (no longer in use) More...

#include <fem_lock.h>

Collaboration diagram for FEM_lock:

Collaboration graph
[legend]

Public Member Functions

 FEM_lock ()
 FEM_lock (int i, femMeshModify *m)
 This entire class is DEPRECATED! It provides locking mechanism for chunks.
 ~FEM_lock ()
int lock (int numNodes, int *nodes, int numElems, int *elems, int elemType=0)
 locking of the chunks is blocking and is strictly in ascending order.
int unlock ()
 Since at one point of time one chunk can only lock one set of chunks for one operation, one does not need to pass arguments to unlock.
int lock (int chunkNo, int own)
int unlock (int chunkNo, int own)
 For sanity, only the owner should unlock it.
int getIdx ()
 FEM_lock ()
 default constructor
 FEM_lock (int i, femMeshModify *m)
 constructor
 FEM_lock (femMeshModify *m)
 constructor
 ~FEM_lock ()
 destructor
void pup (PUP::er &p)
 Pup this object.
int getIdx ()
 Return the index of this chunk.
int lock (int numNodes, int *nodes, int numElems, int *elems, int elemType=0)
 locks all chunks which contain all the following nodes and elements
int unlock ()
 unlock all the chunks this chunk has locked currently
int lock (int chunkNo, int own)
 chunk 'own' locks the chunk 'chunkNo'
int unlock (int chunkNo, int own)
 chunk 'own' unlocks the chunk 'chunkNo'

Private Member Functions

bool existsChunk (int index)
bool existsChunk (int index)
 Is chunk 'index' locked by this chunk currently.

Private Attributes

int idx
 Index of the lock (chunk).
int owner
 Current owner of the lock.
bool isOwner
 Is there an owner for the lock.
bool isLocked
 Is the chunk locked.
bool hasLocks
 Does this chunk have locks.
bool isLocking
 Is this chunk locking some chunks.
bool isUnlocking
 Is this chunk unlocking some chunks.
CkVec< intlockedChunks
femMeshModifymmod
CkVec< intlockedChunks
 The list of chunks locked by this chunk.
femMeshModifymmod
 cross-pointer to the femMeshModify object

Detailed Description

there is one fem_lock associated with every FEM_Mesh: Chunk Lock (no longer in use)

Definition at line 19 of file fem_lock.h.


Constructor & Destructor Documentation

FEM_lock::FEM_lock (  )  [inline]

Definition at line 34 of file fem_lock.h.

FEM_lock::FEM_lock ( int  i,
femMeshModify m 
)

This entire class is DEPRECATED! It provides locking mechanism for chunks.

Definition at line 9 of file fem_lock.C.

References hasLocks, idx, isLocked, isLocking, isOwner, isUnlocking, lockedChunks, mmod, owner, and CkVec< T >::removeAll().

Here is the call graph for this function:

FEM_lock::~FEM_lock (  ) 

Definition at line 21 of file fem_lock.C.

References hasLocks, lockedChunks, and unlock().

Here is the call graph for this function:

FEM_lock::FEM_lock (  )  [inline]

default constructor

Definition at line 38 of file ParFUM_locking.h.

FEM_lock::FEM_lock ( int  i,
femMeshModify m 
)

constructor

FEM_lock::FEM_lock ( femMeshModify m  ) 

constructor

Definition at line 25 of file lock.C.

References hasLocks, idx, isLocked, isLocking, isOwner, isUnlocking, lockedChunks, mmod, owner, and CkVec< T >::removeAll().

Here is the call graph for this function:

FEM_lock::~FEM_lock (  ) 

destructor


Member Function Documentation

bool FEM_lock::existsChunk ( int  index  )  [private]

Definition at line 29 of file fem_lock.C.

References lockedChunks, and CkVec< T >::size().

Referenced by lock().

Here is the call graph for this function:

Here is the caller graph for this function:

int FEM_lock::lock ( int  numNodes,
int nodes,
int  numElems,
int elems,
int  elemType = 0 
)

locking of the chunks is blocking and is strictly in ascending order.

will only return if it gets the locks the set of nodes or elems that a chunk can ask to be locked can either be shared, ghosts or local nodes/elements.

Definition at line 39 of file fem_lock.C.

References CthYield(), CpuTopoDetails::done, FEM_Mesh::elem, existsChunk(), femMeshModify::fmMesh, femMeshModify::fmUtil, free(), FEM_MUtil::getChunkNos(), FEM_Entity::ghost, hasLocks, idx, FEM_Entity::is_valid(), isLocked, isLocking, isOwner, isUnlocking, lockedChunks, mmod, FEM_Mesh::node, CkVec< T >::push_back(), CkVec< T >::removeAll(), and CkVec< T >::size().

Referenced by FEM_Modify_Lock(), and femMeshModify::lockRemoteChunk().

Here is the call graph for this function:

Here is the caller graph for this function:

int FEM_lock::unlock (  ) 

Since at one point of time one chunk can only lock one set of chunks for one operation, one does not need to pass arguments to unlock.

Definition at line 151 of file fem_lock.C.

References CthYield(), CpuTopoDetails::done, hasLocks, idx, isLocked, isLocking, isOwner, isUnlocking, lockedChunks, CkVec< T >::removeAll(), and CkVec< T >::size().

Referenced by FEM_Modify_Unlock(), femMeshModify::unlockRemoteChunk(), and ~FEM_lock().

Here is the call graph for this function:

Here is the caller graph for this function:

int FEM_lock::lock ( int  chunkNo,
int  own 
)

Definition at line 183 of file fem_lock.C.

References CthYield(), hasLocks, intMsg::i, idx, isLocked, isOwner, isUnlocking, meshMod, and owner.

Here is the call graph for this function:

int FEM_lock::unlock ( int  chunkNo,
int  own 
)

For sanity, only the owner should unlock it.

Definition at line 219 of file fem_lock.C.

References CthYield(), intMsg::i, idx, isLocked, isLocking, isOwner, meshMod, and owner.

Here is the call graph for this function:

int FEM_lock::getIdx (  )  [inline]

Definition at line 48 of file fem_lock.h.

References idx.

bool FEM_lock::existsChunk ( int  index  )  [private]

Is chunk 'index' locked by this chunk currently.

void FEM_lock::pup ( PUP::er p  ) 

Pup this object.

Definition at line 44 of file lock.C.

References hasLocks, idx, isLocked, isLocking, isOwner, isUnlocking, lockedChunks, and owner.

Referenced by femMeshModify::pup().

Here is the caller graph for this function:

int FEM_lock::getIdx (  )  [inline]

Return the index of this chunk.

Definition at line 49 of file ParFUM_locking.h.

References idx.

int FEM_lock::lock ( int  numNodes,
int nodes,
int  numElems,
int elems,
int  elemType = 0 
)

locks all chunks which contain all the following nodes and elements

int FEM_lock::unlock (  ) 

unlock all the chunks this chunk has locked currently

int FEM_lock::lock ( int  chunkNo,
int  own 
)

chunk 'own' locks the chunk 'chunkNo'

int FEM_lock::unlock ( int  chunkNo,
int  own 
)

chunk 'own' unlocks the chunk 'chunkNo'


Field Documentation

int FEM_lock::idx [private]

Index of the lock (chunk).

Definition at line 20 of file fem_lock.h.

Referenced by FEM_lock(), getIdx(), lock(), pup(), and unlock().

int FEM_lock::owner [private]

Current owner of the lock.

Definition at line 21 of file fem_lock.h.

Referenced by FEM_lock(), lock(), pup(), and unlock().

Is there an owner for the lock.

Definition at line 22 of file fem_lock.h.

Referenced by FEM_lock(), lock(), pup(), and unlock().

Is the chunk locked.

Definition at line 23 of file fem_lock.h.

Referenced by FEM_lock(), lock(), pup(), and unlock().

Does this chunk have locks.

Definition at line 24 of file fem_lock.h.

Referenced by FEM_lock(), lock(), pup(), unlock(), and ~FEM_lock().

Is this chunk locking some chunks.

Definition at line 25 of file fem_lock.h.

Referenced by FEM_lock(), lock(), pup(), and unlock().

Is this chunk unlocking some chunks.

Definition at line 26 of file fem_lock.h.

Referenced by FEM_lock(), lock(), pup(), and unlock().

Definition at line 27 of file fem_lock.h.

Referenced by existsChunk(), FEM_lock(), lock(), pup(), unlock(), and ~FEM_lock().

Definition at line 28 of file fem_lock.h.

Referenced by FEM_lock(), and lock().

The list of chunks locked by this chunk.

Definition at line 28 of file ParFUM_locking.h.

cross-pointer to the femMeshModify object

Definition at line 30 of file ParFUM_locking.h.


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

Generated on Mon Sep 21 08:24:17 2020 for Charm++ by  doxygen 1.5.5