class
JobResourcePoolManages the job-local resources used by tp::
Base classes
- class Ownable
- A customizable base class that is used for objects returned by the API in an OwningPtr.
Public functions
- auto createJob(JobFlagMask flags = {}, const char* debugName = nullptr) -> Job
- Creates a new tp::
Job object that can be later enqueued to the pool's associated device queue. - auto getStatistics() const -> JobResourcePoolStatistics
- Returns the current statistics of this resource pool.
- auto trim(const JobSemaphore& latestTrimmed = {}) -> uint64_t
- Attempts to free unused resources from the pool. Returns the number of bytes freed, if any.
Function documentation
Job tp:: JobResourcePool:: createJob(JobFlagMask flags = {},
const char* debugName = nullptr)
Creates a new tp::
Parameters | |
---|---|
flags | Additional flags for creation of the job. |
debugName | The debug name identifier for the job. |
uint64_t tp:: JobResourcePool:: trim(const JobSemaphore& latestTrimmed = {})
Attempts to free unused resources from the pool. Returns the number of bytes freed, if any.
Parameters | |
---|---|
latestTrimmed | If given, serves as a hint to only free the resources that have been last used during the job associated to the given semaphore. The semaphore must be from the same queue as the one associated with this pool. If the semaphore is null, all currently unused resources may be freed. |