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:64
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 producer-specific result or product.
Definition artifact.h:78
loomc_string_view_t format
Stable format string, such as amdgpu-hsaco, spirv, LOOMC_ARTIFACT_FORMAT_LOOM_TEXT,...
Definition artifact.h:84
loomc_artifact_kind_t kind
Artifact kind.
Definition artifact.h:80
loomc_byte_sequence_t * contents
Immutable artifact bytes.
Definition artifact.h:91
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