CUDA Templates for Linear Algebra Subroutines and Solvers
Public Member Functions | Public Attributes | List of all members
cutlass::Semaphore Class Reference

CTA-wide semaphore for inter-CTA synchronization.

#include <semaphore.h>

Public Member Functions

CUTLASS_HOST_DEVICE Semaphore (int *lock_, int thread_id)
 Implements a semaphore to wait for a flag to reach a given value. More...
CUTLASS_DEVICE void fetch ()
 Permit fetching the synchronization mechanism early. More...
CUTLASS_DEVICE int get_state () const
 Gets the internal state. More...
CUTLASS_DEVICE void wait (int status=0)
 Waits until the semaphore is equal to the given value. More...
CUTLASS_DEVICE void release (int status=0)
 Updates the lock with the given result. More...

Public Attributes

int * lock
bool wait_thread
int state

Constructor & Destructor Documentation

CUTLASS_HOST_DEVICE cutlass::Semaphore::Semaphore ( int *  lock_,
int  thread_id 

Member Function Documentation

CUTLASS_DEVICE void cutlass::Semaphore::fetch ( )
CUTLASS_DEVICE int cutlass::Semaphore::get_state ( ) const
CUTLASS_DEVICE void cutlass::Semaphore::release ( int  status = 0)
CUTLASS_DEVICE void cutlass::Semaphore::wait ( int  status = 0)

Member Data Documentation

int* cutlass::Semaphore::lock
int cutlass::Semaphore::state
bool cutlass::Semaphore::wait_thread

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