10 #define TALVOS_QUEUE_H
12 #include <condition_variable>
43 void submit(
const std::vector<Command *> &NewCommands,
44 volatile bool *Fence =
nullptr);
void submit(const std::vector< Command * > &NewCommands, volatile bool *Fence=nullptr)
Submit a batch of commands to the queue.
std::condition_variable StateChanged
Condition variable to signal when queue state has changed.
Device & Dev
The device that this queue will execute work on.
std::queue< Command * > Commands
The queue of pending commands.
volatile bool Running
Flag to signal whether the queue thread is active.
~Queue()
Destroy the queue.
This class represents a queue for executing commands on a device.
void run()
Entry point for background queue thread.
void waitIdle()
Wait until all commands in the queue have completed.
A Device instance encapsulates properties and state for the virtual device.
std::set< volatile bool * > Fences
A set of pending fences.
Queue & operator=(const Queue &)=delete
std::mutex Mutex
Mutex used to guard queue updates.
Queue(Device &Dev)
Create a queue for the specified device.