Loom C API
Public Loom compiler C API
Loading...
Searching...
No Matches
task_pool.h
Go to the documentation of this file.
1// Copyright 2026 The IREE Authors
2//
3// Licensed under the Apache License v2.0 with LLVM Exceptions.
4// See https://llvm.org/LICENSE.txt for license information.
5// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6
7#ifndef LOOMC_TASK_POOL_H_
8#define LOOMC_TASK_POOL_H_
9
10#include "loomc/status.h"
11
24
25#ifdef __cplusplus
26extern "C" {
27#endif
28
31
66
79 const loomc_task_pool_options_t* options, loomc_allocator_t allocator,
80 loomc_task_pool_t** out_pool);
81
88
97
98#ifdef __cplusplus
99} // extern "C"
100#endif
101
102#endif // LOOMC_TASK_POOL_H_
#define LOOMC_API_EXPORT
Exports a public Loom C API symbol from a shared library build.
Definition base.h:34
size_t loomc_host_size_t
Host allocation and container size type.
Definition base.h:45
loomc_structure_type_t
Structure type values used by extensible public descriptors.
Definition base.h:181
struct iree_status_handle_t * loomc_status_t
Opaque status handle.
Definition base.h:55
Status codes and rich infrastructure error reporting.
Host allocator used for persistent Loom object storage.
Definition base.h:390
Task-pool creation options.
Definition task_pool.h:37
const void * next
Extension chain for future task-pool options.
Definition task_pool.h:46
loomc_host_size_t structure_size
Size of this structure in bytes.
Definition task_pool.h:43
loomc_structure_type_t type
Structure type.
Definition task_pool.h:40
loomc_host_size_t worker_stack_size
Minimum stack size in bytes for each worker, or zero for the default.
Definition task_pool.h:64
loomc_host_size_t max_worker_count
Maximum physical-core workers to create, or zero for the default.
Definition task_pool.h:56
struct loomc_task_pool_t loomc_task_pool_t
Opaque standard task pool.
Definition task_pool.h:30
void loomc_task_pool_free(loomc_task_pool_t *pool)
Releases the pool's worker-executor reference and frees pool.
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.