|
NVBIO
|
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) |
| typedef WorkUnitT nvbio::cuda::WorkQueue< PolicyTag, WorkUnitT, BLOCKDIM >::WorkUnit |
Definition at line 259 of file work_queue.h.
|
inline |
constructor
Definition at line 263 of file work_queue.h.
|
inline |
consume a stream of work units
Definition at line 277 of file work_queue.h.
| 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.
|
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.
1.8.4