20 std::shared_ptr<GPUSecondaryContext> thread_context =
23 std::make_unique<std::thread>([
this, thread_context]() { this->run(thread_context); }));
35 for (std::unique_ptr<std::thread> &
thread : threads_) {
56void GPUWorker::run(std::shared_ptr<GPUSecondaryContext> context)
constexpr IndexRange()=default
GPUWorker(uint32_t threads_count, ContextType context_type, WorkCallback callback)
WorkID push_work(void *work, ThreadQueueWorkPriority priority)
bool cancel_work(WorkID id)
void(*)(void *) WorkCallback
BLI_assert(slot->slot_subtype.map==BMO_OP_SLOT_SUBTYPE_MAP_FLT)
void BLI_thread_queue_nowait(ThreadQueue *queue)
bool BLI_thread_queue_cancel_work(ThreadQueue *queue, uint64_t work_id)
void BLI_thread_queue_wait_finish(ThreadQueue *queue)
bool BLI_thread_queue_is_empty(ThreadQueue *queue)
void BLI_thread_queue_free(ThreadQueue *queue)
ThreadQueue * BLI_thread_queue_init()
void * BLI_thread_queue_pop(ThreadQueue *queue)
uint64_t BLI_thread_queue_push(ThreadQueue *queue, void *work, ThreadQueueWorkPriority priority)