SST/macro
Classes | Public Types | Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
sstmac::native::thread_barrier Class Reference

#include <thread_barrier.h>

Collaboration diagram for sstmac::native::thread_barrier:
Collaboration graph

Classes

struct  barrier_state
 

Public Types

typedef pthread_mutex_t lock_t
 

Public Member Functions

 thread_barrier (int nthread)
 
 thread_barrier ()
 
void start (int me, thread_barrier_functor *functor=0)
 
int64_t vote (int me, int64_t vote, thread_barrier_functor *functor=0)
 
void init (int nthread)
 

Protected Member Functions

int64_t run (int me, int level, int nthread, int64_t vote, thread_barrier_functor *functor)
 
void lock (lock_t *l)
 
void unlock (lock_t *l)
 
int init_level (int level, int num, int offset)
 

Protected Attributes

int nthread_
 
int twoPowN_
 
lock_tout_locks_
 
lock_tin_locks_
 
std::vector< std::vector< barrier_state > > levels_
 

Detailed Description

Definition at line 20 of file thread_barrier.h.

Member Typedef Documentation

Definition at line 26 of file thread_barrier.h.

Constructor & Destructor Documentation

sstmac::native::thread_barrier::thread_barrier ( int  nthread)
sstmac::native::thread_barrier::thread_barrier ( )
inline

Definition at line 31 of file thread_barrier.h.

References sstmac::init(), and sstmac::run().

Here is the call graph for this function:

Member Function Documentation

void sstmac::native::thread_barrier::init ( int  nthread)
int sstmac::native::thread_barrier::init_level ( int  level,
int  num,
int  offset 
)
protected
void sstmac::native::thread_barrier::lock ( lock_t l)
protected
int64_t sstmac::native::thread_barrier::run ( int  me,
int  level,
int  nthread,
int64_t  vote,
thread_barrier_functor functor 
)
protected
void sstmac::native::thread_barrier::start ( int  me,
thread_barrier_functor functor = 0 
)
void sstmac::native::thread_barrier::unlock ( lock_t l)
protected
int64_t sstmac::native::thread_barrier::vote ( int  me,
int64_t  vote,
thread_barrier_functor functor = 0 
)

Member Data Documentation

lock_t* sstmac::native::thread_barrier::in_locks_
protected

Definition at line 63 of file thread_barrier.h.

std::vector<std::vector<barrier_state> > sstmac::native::thread_barrier::levels_
protected

Definition at line 64 of file thread_barrier.h.

int sstmac::native::thread_barrier::nthread_
protected

Definition at line 60 of file thread_barrier.h.

lock_t* sstmac::native::thread_barrier::out_locks_
protected

Definition at line 62 of file thread_barrier.h.

int sstmac::native::thread_barrier::twoPowN_
protected

Definition at line 61 of file thread_barrier.h.


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