Fermat
Public Types | Public Methods | List of all members
cugar::WorkQueue< WorkItemT, ProgressCallbackT > Class Template Reference

Detailed description

template<typename WorkItemT, typename ProgressCallbackT>
class cugar::WorkQueue< WorkItemT, ProgressCallbackT >

A host work queue class

Template Parameters
WorkItemTthe type of work items
ProgressCallbackTa callback used to report progress, with the following interface:
void callback(uint32 queue_entry, uint32 total_queue_size);

#include <threads.h>

Public Types

typedef WorkItemT WorkItem
 
typedef ProgressCallbackT ProgressCallback
 

Public Methods

 WorkQueue ()
 empty constructor
 
void push (const WorkItem work)
 push a work item in the queue
 
void locked_push (const WorkItem work)
 push a work item in the queue
 
bool pop (WorkItem &work)
 pop the next work item from the queue
 
void set_callback (const ProgressCallback callback)
 set a callback
 

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