27#if defined(_WIN32) && defined(LOOMC_BUILDING_SHARED_LIBRARY)
28#define LOOMC_API_EXPORT __declspec(dllexport)
29#elif defined(_WIN32) && defined(LOOMC_USING_SHARED_LIBRARY)
30#define LOOMC_API_EXPORT __declspec(dllimport)
31#elif defined(LOOMC_BUILDING_SHARED_LIBRARY)
32#define LOOMC_API_EXPORT __attribute__((visibility("default")))
34#define LOOMC_API_EXPORT
48#define LOOMC_HOST_SIZE_MAX ((loomc_host_size_t)(SIZE_MAX))
84 return value.
data == NULL || value.
size == 0;
181typedef enum loomc_structure_type_e {
342#if !defined(IREE_ALLOCATOR_ALLOC_PARAMS_T_DEFINED_)
344#define IREE_ALLOCATOR_ALLOC_PARAMS_T_DEFINED_
346typedef struct iree_allocator_alloc_params_t {
388 return allocator.
ctl != NULL;
#define LOOMC_API_EXPORT
Exports a public Loom C API symbol from a shared library build.
Definition base.h:34
loomc_allocator_t loomc_allocator_system(void)
Returns a process-global system allocator.
size_t loomc_host_size_t
Host allocation and container size type.
Definition base.h:45
loomc_status_t(* loomc_allocator_ctl_fn_t)(void *self, loomc_allocator_command_t command, const void *params, void **inout_ptr)
Host allocation control callback.
Definition base.h:367
loomc_structure_type_t
Structure type values used by extensible public descriptors.
Definition base.h:181
@ LOOMC_STRUCTURE_TYPE_AMDGPU_PROFILE_OPTIONS
loomc_amdgpu_profile_options_t.
Definition base.h:264
@ LOOMC_STRUCTURE_TYPE_CONTEXT_TARGET_OPTIONS
loomc_context_target_options_t.
Definition base.h:219
@ LOOMC_STRUCTURE_TYPE_OPTION_DICT
loomc_option_dict_t.
Definition base.h:237
@ LOOMC_STRUCTURE_TYPE_SPIRV_PROFILE_OPTIONS
loomc_spirv_profile_options_t.
Definition base.h:231
@ LOOMC_STRUCTURE_TYPE_COMPILE_REPORT_OPTIONS
loomc_compile_report_options_t.
Definition base.h:273
@ LOOMC_STRUCTURE_TYPE_IREE_HAL_PROFILE_OPTIONS
loomc_iree_hal_profile_options_t.
Definition base.h:252
@ LOOMC_STRUCTURE_TYPE_ARTIFACT_MANIFEST_OPTIONS
loomc_artifact_manifest_options_t.
Definition base.h:270
@ LOOMC_STRUCTURE_TYPE_TARGET_PIPELINE_OPTIONS
loomc_target_pipeline_options_t.
Definition base.h:222
@ LOOMC_STRUCTURE_TYPE_MODULE_DESERIALIZE_OPTIONS
loomc_module_deserialize_options_t.
Definition base.h:207
@ LOOMC_STRUCTURE_TYPE_SPIRV_IREE_HAL_PROFILE_OPTIONS
loomc_spirv_iree_hal_profile_options_t.
Definition base.h:255
@ LOOMC_STRUCTURE_TYPE_LINK_OPTIONS
loomc_link_options_t.
Definition base.h:201
@ LOOMC_STRUCTURE_TYPE_MODULE_SERIALIZE_OPTIONS
loomc_module_serialize_options_t.
Definition base.h:204
@ LOOMC_STRUCTURE_TYPE_LINKER_OPTIONS
loomc_linker_options_t.
Definition base.h:198
@ LOOMC_STRUCTURE_TYPE_SPIRV_VULKANINFO_PROFILE_OPTIONS
loomc_spirv_vulkaninfo_profile_options_t.
Definition base.h:240
@ LOOMC_STRUCTURE_TYPE_MODULE_FUNCTION_QUERY_OPTIONS
loomc_module_function_query_options_t.
Definition base.h:258
@ LOOMC_STRUCTURE_TYPE_SOURCE_OPTIONS
loomc_source_options_t.
Definition base.h:186
@ LOOMC_STRUCTURE_TYPE_TARGET_SPECIALIZATION_OPTIONS
loomc_target_specialization_options_t.
Definition base.h:228
@ LOOMC_STRUCTURE_TYPE_MODULE_GLOBAL_QUERY_OPTIONS
loomc_module_global_query_options_t.
Definition base.h:261
@ LOOMC_STRUCTURE_TYPE_AMDGPU_EMIT_OPTIONS
loomc_amdgpu_emit_options_t.
Definition base.h:267
@ LOOMC_STRUCTURE_TYPE_LINK_INDEX_BUILDER_OPTIONS
loomc_link_index_builder_options_t.
Definition base.h:195
@ LOOMC_STRUCTURE_TYPE_SPIRV_VULKAN_FUNCTION_TABLE
loomc_spirv_vulkan_function_table_t.
Definition base.h:246
@ LOOMC_STRUCTURE_TYPE_SOURCE_LOAD_OPTIONS
loomc_source_load_options_t.
Definition base.h:243
@ LOOMC_STRUCTURE_TYPE_SPIRV_VULKAN_PROFILE_OPTIONS
loomc_spirv_vulkan_profile_options_t.
Definition base.h:249
@ LOOMC_STRUCTURE_TYPE_WORKSPACE_OPTIONS
loomc_workspace_options_t.
Definition base.h:189
@ LOOMC_STRUCTURE_TYPE_NONE
No structure type was supplied.
Definition base.h:183
@ LOOMC_STRUCTURE_TYPE_SPIRV_EMIT_OPTIONS
loomc_spirv_emit_options_t.
Definition base.h:225
@ LOOMC_STRUCTURE_TYPE_PASS_PROGRAM_OPTIONS
loomc_pass_program_options_t.
Definition base.h:216
@ LOOMC_STRUCTURE_TYPE_COMPILER_OPTIONS
loomc_compiler_options_t.
Definition base.h:210
@ LOOMC_STRUCTURE_TYPE_CONTEXT_OPTIONS
loomc_context_options_t.
Definition base.h:192
@ LOOMC_STRUCTURE_TYPE_COMPILE_OPTIONS
loomc_compile_options_t.
Definition base.h:213
@ LOOMC_STRUCTURE_TYPE_EMIT_OPTIONS
loomc_emit_options_t.
Definition base.h:234
@ LOOMC_STRUCTURE_TYPE_LAUNCH_CONFIG
loomc_launch_config_t.
Definition base.h:279
@ LOOMC_STRUCTURE_TYPE_AMDGPU_IREE_HAL_PROFILE_OPTIONS
loomc_amdgpu_iree_hal_profile_options_t.
Definition base.h:282
@ LOOMC_STRUCTURE_TYPE_SANITIZER_OPTIONS
loomc_sanitizer_options_t.
Definition base.h:276
void loomc_allocator_free(loomc_allocator_t allocator, void *ptr)
Frees memory previously returned by allocator.
#define LOOMC_API_PTR
Marks a public callback function pointer type.
Definition base.h:38
@ LOOMC_ALLOCATOR_COMMAND_REALLOC
Resizes an existing allocation.
Definition base.h:336
@ LOOMC_ALLOCATOR_COMMAND_MALLOC
Allocates memory without requiring zero initialization.
Definition base.h:330
@ LOOMC_ALLOCATOR_COMMAND_CALLOC
Allocates memory and zeros it before returning.
Definition base.h:333
@ LOOMC_ALLOCATOR_COMMAND_FREE
Frees an existing allocation.
Definition base.h:339
struct iree_status_handle_t * loomc_status_t
Opaque status handle.
Definition base.h:55
loomc_status_t loomc_allocator_malloc(loomc_allocator_t allocator, loomc_host_size_t byte_length, void **out_ptr)
Allocates zero-initialized memory from allocator.
loomc_status_t loomc_allocator_malloc_uninitialized(loomc_allocator_t allocator, loomc_host_size_t byte_length, void **out_ptr)
Allocates uninitialized memory from allocator.
uint32_t loomc_allocator_command_t
Controls the behavior of a loomc_allocator_ctl_fn_t callback.
Definition base.h:327
loomc_status_t loomc_string_view_clone(loomc_string_view_t source, loomc_allocator_t allocator, loomc_string_view_t *out_string)
Copies a string view into allocator-owned storage.
Allocation parameters passed to loomc_allocator_ctl_fn_t callbacks.
Definition base.h:346
loomc_host_size_t byte_length
Minimum allocation size in bytes.
Definition base.h:348
Host allocator used for persistent Loom object storage.
Definition base.h:375
loomc_allocator_ctl_fn_t ctl
Callback implementing allocation commands.
Definition base.h:380
void * self
Callback-owned state pointer.
Definition base.h:377
Non-owning view over immutable bytes.
Definition base.h:128
loomc_host_size_t data_length
Number of bytes in data.
Definition base.h:133
const uint8_t * data
First byte of the span, or NULL when the span is empty.
Definition base.h:130
Three-dimensional unsigned extent used by Loom C API structs.
Definition base.h:165
uint32_t z
Extent along the z dimension.
Definition base.h:173
uint32_t x
Extent along the x dimension.
Definition base.h:167
uint32_t y
Extent along the y dimension.
Definition base.h:170
Ordered loose string option dictionary.
Definition base.h:309
loomc_host_size_t structure_size
Size of this structure in bytes.
Definition base.h:314
const loomc_option_entry_t * entries
Ordered option entries.
Definition base.h:320
loomc_structure_type_t type
Structure type. Must be LOOMC_STRUCTURE_TYPE_OPTION_DICT.
Definition base.h:311
const void * next
Next invocation option extension.
Definition base.h:317
loomc_host_size_t entry_count
Number of entries in entries.
Definition base.h:323
One loose string option entry.
Definition base.h:291
loomc_string_view_t key
Canonical option key.
Definition base.h:293
loomc_string_view_t value
Option value.
Definition base.h:296
Non-owning string view over bytes that need not be NUL-terminated.
Definition base.h:63
const char * data
First byte of the string, or NULL when the view is empty.
Definition base.h:65
loomc_host_size_t size
Number of bytes in data.
Definition base.h:68