tp::JobSemaphore struct

A synchronization primitive created after enqueueing a tp::Job through tp::Device::enqueueJob.

It is created in an unsignalled state. Once the corresponding job finishes executing on the device, the semaphore becomes signalled. Both the device and host can wait for the semaphore to become signalled. Its status can also be checked at any point.

Constructors, destructors, conversion operators

JobSemaphore()
Constructs a null tp::JobSemaphore.

Public functions

auto isNull() const -> bool
Returns true if the semaphore is null and not valid for use.

Public variables

DeviceQueue queue
The queue that the corresponding Job was enqueued into.
uint64_t timestamp
The global number identifying this Job semaphore and its order in the queue.