Loom C API
Public Loom compiler C API
Loading...
Searching...
No Matches
config.h File Reference

Per-invocation configuration bindings. More...

Go to the source code of this file.

Data Structures

struct  loomc_config_binding_t
 Single configuration key/value binding. More...
struct  loomc_config_options_t
 Configuration options attached to a link or compile invocation. More...

Typedefs

typedef uint32_t loomc_config_policy_flags_t
 Bitmask of loomc_config_policy_flag_bits_t values.

Enumerations

enum  loomc_config_policy_flag_bits_t { LOOMC_CONFIG_POLICY_FLAG_REQUIRE_RESOLVED = 1u << 0 }
 Configuration validation and resolution policy bit values. More...

Detailed Description

Per-invocation configuration bindings.

Configuration is intentionally represented as plain borrowed key/value data plus one optional JSON/JSONC object string. Bindings without a matching config declaration are ignored so one stable config bag can serve modules that consume different subsets. Operation descriptors decide whether unresolved configuration may remain in the produced result.

Example
Use JSON for a framework-provided configuration file and explicit bindings for programmatic overrides:
const char* json_config = "{\"tile_m\":\"128\",\"tile_n\":\"64\"}";
loomc_config_binding_t overrides[] = {
{
.key = loomc_make_cstring_view("tile_m"),
.value = loomc_make_cstring_view("256"),
},
};
.bindings = overrides,
.binding_count = 1,
.json_object = loomc_make_cstring_view(json_config),
};
@ LOOMC_CONFIG_POLICY_FLAG_REQUIRE_RESOLVED
Require all final operation config values to be resolved.
Definition config.h:61
Single configuration key/value binding.
Definition config.h:50
Configuration options attached to a link or compile invocation.
Definition config.h:76

Enumeration Type Documentation

◆ loomc_config_policy_flag_bits_t

Configuration validation and resolution policy bit values.

Enumerator
LOOMC_CONFIG_POLICY_FLAG_REQUIRE_RESOLVED 

Require all final operation config values to be resolved.