|
Loom C API
Public Loom compiler C API
|
Task-pool creation options. More...
#include <task_pool.h>
Data Fields | |
| loomc_structure_type_t | type |
| Structure type. | |
| loomc_host_size_t | structure_size |
| Size of this structure in bytes. | |
| const void * | next |
| Extension chain for future task-pool options. | |
| loomc_host_size_t | max_worker_count |
| Maximum physical-core workers to create, or zero for the default. | |
| loomc_host_size_t | worker_stack_size |
| Minimum stack size in bytes for each worker, or zero for the default. | |
Task-pool creation options.
Callers zero-initialize this descriptor, set type to LOOMC_STRUCTURE_TYPE_TASK_POOL_OPTIONS, set structure_size to sizeof(loomc_task_pool_options_t), and fill the requested fields.
| loomc_host_size_t loomc_task_pool_options_t::max_worker_count |
Maximum physical-core workers to create, or zero for the default.
The default is four workers. The actual count may be lower when processor affinity, a container CPU set, or the host topology exposes fewer physical cores. Workers scatter across cache domains so independent compiler jobs use the available memory bandwidth. Latency-oriented hosts commonly request eight; autotuning and compile-report search may benefit from wider pools.
| loomc_structure_type_t loomc_task_pool_options_t::type |
Structure type.
Must be LOOMC_STRUCTURE_TYPE_TASK_POOL_OPTIONS when nonzero.
| loomc_host_size_t loomc_task_pool_options_t::worker_stack_size |
Minimum stack size in bytes for each worker, or zero for the default.
The 2 MiB default is sized for recursive compiler analysis and sanitizer instrumentation rather than only short runtime callbacks. Stack storage is virtual address space reserved by the host threading implementation; physical pages are committed as workers use them.