NVBIO
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Types | Public Methods | List of all members
nvbio::cuda::WorkQueue< PolicyTag, WorkUnitT, BLOCKDIM > Struct Template Reference

Detailed description

template< typename PolicyTag, typename WorkUnitT, uint32 BLOCKDIM>
struct nvbio::cuda::WorkQueue< PolicyTag, WorkUnitT, BLOCKDIM >

Implements a parallel work queue interface (see Work-Queues). This default implementation employs a single kernel launch with static thread assignment and in-place execution of a work-unit and all its continuations. It has very low continuation overhead, but it might suffer from poor SIMT utilization when work-units have wildly varying number of continuations.

Definition at line 257 of file work_queue.h.

#include <work_queue.h>

Public Types

typedef WorkUnitT WorkUnit
 

Public Methods

 WorkQueue ()
 
void set_capacity (const uint32 capacity)
 
template<typename WorkStream >
void consume (const WorkStream stream, WorkQueueStats *stats=NULL)
 
template<typename WorkStream , typename WorkMover >
void consume (const WorkStream stream, const WorkMover mover, WorkQueueStats *stats=NULL)
 

Member Typedef Documentation

template<typename PolicyTag, typename WorkUnitT, uint32 BLOCKDIM>
typedef WorkUnitT nvbio::cuda::WorkQueue< PolicyTag, WorkUnitT, BLOCKDIM >::WorkUnit

Definition at line 259 of file work_queue.h.

Constructor & Destructor Documentation

template<typename PolicyTag, typename WorkUnitT, uint32 BLOCKDIM>
nvbio::cuda::WorkQueue< PolicyTag, WorkUnitT, BLOCKDIM >::WorkQueue ( )
inline

constructor

Definition at line 263 of file work_queue.h.

Member Function Documentation

template<typename PolicyTag, typename WorkUnitT, uint32 BLOCKDIM>
template<typename WorkStream >
void nvbio::cuda::WorkQueue< PolicyTag, WorkUnitT, BLOCKDIM >::consume ( const WorkStream  stream,
WorkQueueStats stats = NULL 
)
inline

consume a stream of work units

Definition at line 277 of file work_queue.h.

template<typename PolicyTag , typename WorkUnitT , uint32 BLOCKDIM>
template<typename WorkStream , typename WorkMover >
void nvbio::cuda::WorkQueue< PolicyTag, WorkUnitT, BLOCKDIM >::consume ( const WorkStream  stream,
const WorkMover  mover,
WorkQueueStats stats = NULL 
)

consume a stream of work units

Definition at line 98 of file work_queue_inl.h.

template<typename PolicyTag, typename WorkUnitT, uint32 BLOCKDIM>
void nvbio::cuda::WorkQueue< PolicyTag, WorkUnitT, BLOCKDIM >::set_capacity ( const uint32  capacity)
inline

set queue capacity.

In this context, the queue capacity is the maximum amount of persistent threads used to run the stream. Limiting it might be useful when the work-units reference some limited external temporary storage.

Definition at line 272 of file work_queue.h.


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