|
Loom C API
Public Loom compiler C API
|
Optional standard worker population for concurrent application work. More...
Go to the source code of this file.
Data Structures | |
| struct | loomc_task_pool_options_t |
| Task-pool creation options. More... | |
Typedefs | |
| typedef struct loomc_task_pool_t | loomc_task_pool_t |
| Opaque standard task pool. | |
Functions | |
| loomc_status_t | loomc_task_pool_allocate (const loomc_task_pool_options_t *options, loomc_allocator_t allocator, loomc_task_pool_t **out_pool) |
| Allocates a standard task pool and starts its worker population. | |
| loomc_host_size_t | loomc_task_pool_worker_count (const loomc_task_pool_t *pool) |
| Returns the number of worker threads represented by pool. | |
| void | loomc_task_pool_free (loomc_task_pool_t *pool) |
| Releases the pool's worker-executor reference and frees pool. | |
Optional standard worker population for concurrent application work.
A pool retains one worker executor but no work queue or scheduling policy. Callers attach one loomc_task_queue_t for each independent Loom task domain, while IREE-hosted applications may attach other cooperative processes such as HAL executable or command-buffer materializers. This lets compilation and materialization overlap without creating competing worker populations or forcing unrelated work through one FIFO.
Applications with an existing scheduler use loomc_task_sink_t without linking this package or the IREE task runtime.
| loomc_status_t loomc_task_pool_allocate | ( | const loomc_task_pool_options_t * | options, |
| loomc_allocator_t | allocator, | ||
| loomc_task_pool_t ** | out_pool ) |
Allocates a standard task pool and starts its worker population.
| options | Pool configuration, or NULL for defaults. |
| allocator | Host allocator used for pool and executor storage. |
| out_pool | Receives the allocated pool on success. |
| void loomc_task_pool_free | ( | loomc_task_pool_t * | pool | ) |
Releases the pool's worker-executor reference and frees pool.
| pool | Pool to free. Passing NULL is allowed. |
Attached task queues and native processes retain the worker executor until their own teardown completes. Freeing the final executor owner joins the worker threads before returning.
| loomc_host_size_t loomc_task_pool_worker_count | ( | const loomc_task_pool_t * | pool | ) |
Returns the number of worker threads represented by pool.
| pool | Pool to inspect, or NULL. |