NVBIO
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Methods | List of all members
nvbio::cuda::condition Struct Reference

Detailed description

implements a simple inter-CTA condition variable

The condition variable is actually an integer, and the interface offers the possibility to test if / wait until the variable is greater than a given value.

Upon signaling, the condition variable is atomically increased.

Definition at line 45 of file condition.h.

#include <condition.h>

Public Methods

NVBIO_FORCEINLINE NVBIO_HOST_DEVICE condition (uint32 *cond)
 
NVBIO_FORCEINLINE NVBIO_DEVICE bool test (const uint32 i=1)
 
NVBIO_FORCEINLINE NVBIO_DEVICE void wait (const uint32 i=1) const
 
NVBIO_FORCEINLINE NVBIO_DEVICE bool wait (const uint32 i, const uint32 n_iter) const
 
NVBIO_FORCEINLINE NVBIO_DEVICE void signal (const uint32 d=1)
 
NVBIO_FORCEINLINE NVBIO_DEVICE void set (const uint32 i)
 
NVBIO_FORCEINLINE NVBIO_DEVICE
uint32 
value (const uint32 i=0)
 

Constructor & Destructor Documentation

NVBIO_FORCEINLINE NVBIO_HOST_DEVICE nvbio::cuda::condition::condition ( uint32 cond)
inline

internal constructor

Definition at line 50 of file condition.h.

Member Function Documentation

NVBIO_FORCEINLINE NVBIO_DEVICE void nvbio::cuda::condition::set ( const uint32  i)
inline

set the condition variable to a specific value

Definition at line 76 of file condition.h.

NVBIO_FORCEINLINE NVBIO_DEVICE void nvbio::cuda::condition::signal ( const uint32  d = 1)
inline

set the condition variable

Definition at line 71 of file condition.h.

NVBIO_FORCEINLINE NVBIO_DEVICE bool nvbio::cuda::condition::test ( const uint32  i = 1)
inline

test the condition without waiting

Definition at line 56 of file condition.h.

NVBIO_FORCEINLINE NVBIO_DEVICE uint32 nvbio::cuda::condition::value ( const uint32  i = 0)
inline

return the current value of the variable

Definition at line 81 of file condition.h.

NVBIO_FORCEINLINE NVBIO_DEVICE void nvbio::cuda::condition::wait ( const uint32  i = 1) const
inline

poll until the condition is met

Definition at line 61 of file condition.h.

NVBIO_FORCEINLINE NVBIO_DEVICE bool nvbio::cuda::condition::wait ( const uint32  i,
const uint32  n_iter 
) const
inline

poll until the condition is met

Definition at line 66 of file condition.h.


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