cub::GridBarrierLifetime

Defined in cub/grid/grid_barrier.cuh

class GridBarrierLifetime : public cub::GridBarrier

GridBarrierLifetime extends GridBarrier to provide lifetime management of the temporary device storage needed for cooperation.

Uses RAII for lifetime, i.e., device resources are reclaimed when the destructor is called.

Public Functions

inline GridBarrierLifetime()

Constructor.

inline cudaError_t HostReset()

DeviceFrees and resets the progress counters.

inline virtual ~GridBarrierLifetime()

Destructor.

inline cudaError_t Setup(int sweep_grid_size)

Sets up the progress counters for the next kernel launch (lazily allocating and initializing them if necessary)

inline void Sync() const

Synchronize.

Protected Types

using SyncFlag = unsigned int

Protected Attributes

size_t sync_bytes
SyncFlag *d_sync