Shared operation result container.
A result exists when an operation completed far enough to report domain-specific state. API and infrastructure failures that prevent result creation are returned as non-OK loomc_status_t values instead.
if (!loomc_status_is_ok(status)) {
return status;
}
++i) {
}
++i) {
}
}
size_t loomc_host_size_t
Host allocation and container size type.
Definition base.h:45
struct iree_status_handle_t * loomc_status_t
Opaque status handle.
Definition base.h:55
void loomc_result_release(loomc_result_t *result)
Releases result from one owner.
const loomc_diagnostic_t * loomc_result_diagnostic_at(const loomc_result_t *result, loomc_host_size_t index)
Returns a diagnostic by index.
const loomc_artifact_t * loomc_result_artifact_at(const loomc_result_t *result, loomc_host_size_t index)
Returns an artifact by index.
bool loomc_result_succeeded(const loomc_result_t *result)
Returns true when result succeeded.
struct loomc_result_t loomc_result_t
Immutable operation result.
Definition result.h:63
loomc_host_size_t loomc_result_artifact_count(const loomc_result_t *result)
Returns the number of artifacts attached to result.
loomc_host_size_t loomc_result_diagnostic_count(const loomc_result_t *result)
Returns the number of diagnostics attached to result.
Borrowed artifact view owned by a result object.
Definition artifact.h:75
loomc_string_view_t format
Stable format string, such as vmfb, spirv, LOOMC_ARTIFACT_FORMAT_LOOM_TEXT, or LOOMC_ARTIFACT_FORMAT_...
Definition artifact.h:81
loomc_artifact_kind_t kind
Artifact kind.
Definition artifact.h:77
loomc_byte_span_t contents
Artifact bytes.
Definition artifact.h:87
Borrowed diagnostic view owned by a result object.
Definition diagnostic.h:72
loomc_string_view_t message
Human-readable rendered message.
Definition diagnostic.h:80
loomc_string_view_t code
Stable diagnostic code.
Definition diagnostic.h:77
loomc_source_range_t range
Primary source range.
Definition diagnostic.h:83
loomc_diagnostic_severity_t severity
Diagnostic severity.
Definition diagnostic.h:74